#random #traits #derive #plugin #foo #isize #f64 #enums #derive-for-rand

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

#12 in #isize

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