#rand #macros #derive #plugin #random-number #macro #random

nightly rand_macros

#[derive]-like functionality for the rand::Rand trait

10 releases

Uses old Rust 2015

0.1.10 Dec 19, 2015
0.1.9 Aug 31, 2015
0.1.8 May 25, 2015
0.1.6 Apr 18, 2015
0.1.4 Feb 19, 2015

#2262 in Rust patterns

Download history 89/week @ 2023-10-15 85/week @ 2023-10-22 72/week @ 2023-10-29 75/week @ 2023-11-05 80/week @ 2023-11-12 87/week @ 2023-11-19 104/week @ 2023-11-26 99/week @ 2023-12-03 72/week @ 2023-12-10 86/week @ 2023-12-17 101/week @ 2023-12-24 66/week @ 2023-12-31 84/week @ 2024-01-07 73/week @ 2024-01-14 101/week @ 2024-01-21 97/week @ 2024-01-28

366 downloads per month

MIT/Apache

8KB
148 lines

#[derive]-like functionality for the rand::Rand trait.

Example

#![feature(plugin)]

#![plugin(rand_macros)]

extern crate rand;

#[derive_Rand]
struct Foo {
    x: u8,
    y: isize
}

#[derive_Rand]
enum Bar {
    X(char),
    Y(f64)
}

No runtime deps