#rand #traits #derive

nightly rand_macros

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

10 个版本

使用旧的 Rust 2015

0.1.10 2015年12月19日
0.1.9 2015年8月31日
0.1.8 2015年5月25日
0.1.6 2015年4月18日
0.1.4 2015年2月19日

78#rand

Download history 1/week @ 2024-04-11 1/week @ 2024-04-18 1/week @ 2024-04-25 1/week @ 2024-05-16 1/week @ 2024-05-23 1/week @ 2024-06-06 2/week @ 2024-06-13 55/week @ 2024-07-04 23/week @ 2024-07-11 2/week @ 2024-07-25

80 每月下载量

MIT/Apache

8KB
148

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

无运行时依赖