tree: 9f7af34953c2dc91143301b267646487ee2569c2 [path history] [tgz]
  1. Cargo.toml
  2. README.md
  3. src/
  4. tests/
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)
}