tree: 3f216a7b07d8c2649af338d2c6a76f00606d3466 [path history] [tgz]
  1. src/
  2. tests/
  3. Cargo.toml
  4. README.md
rand_macros/README.md

#[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)
}