Crates.io | rand_macros |
lib.rs | rand_macros |
version | 0.1.10 |
source | src |
created_at | 2015-02-03 22:56:55.378551 |
updated_at | 2015-12-19 18:11:25.159149 |
description | `#[derive]`-like functionality for the `rand::Rand` trait. |
homepage | https://github.com/rust-lang/rand |
repository | https://github.com/rust-lang/rand |
max_upload_size | |
id | 1342 |
size | 8,129 |
#[derive]
-like functionality for the rand::Rand
trait.
#![feature(plugin)]
#![plugin(rand_macros)]
extern crate rand;
#[derive_Rand]
struct Foo {
x: u8,
y: isize
}
#[derive_Rand]
enum Bar {
X(char),
Y(f64)
}