rand_macros

Crates.iorand_macros
lib.rsrand_macros
version0.1.10
sourcesrc
created_at2015-02-03 22:56:55.378551
updated_at2015-12-19 18:11:25.159149
description`#[derive]`-like functionality for the `rand::Rand` trait.
homepagehttps://github.com/rust-lang/rand
repositoryhttps://github.com/rust-lang/rand
max_upload_size
id1342
size8,129
Alex Crichton (alexcrichton)

documentation

http://doc.rust-lang.org/rand

README

#[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)
}
Commit count: 3170

cargo fmt