tree: 70ff7ff7cee396b9ff738f656a318cf05bc6921d [path history] [tgz]
  1. src/
  2. Cargo.toml
  3. README.md
rand_macros/README.md

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

Example

#![feature(plugin)]

#[plugin] #[no_link] extern crate rand_macros;
extern crate rand;

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

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