Registry / utility / rand-derive2

rand-derive2

JSON →
library0.1.21rscratesunverified

Generate customizable random types with the rand crate.

# Cargo.toml [dependencies] rand_derive2 = "0.1.21"
INSTALL
IMPORT
SIG · RAND-DERIVE2
R
rand-derive2
utilityrustv0.1.21
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Rand
use rand_derive2::Rand;

Derive Rand for a struct to generate random instances.

use rand_derive2::Rand; #[derive(Rand)] struct Point { x: i32, y: i32 } fn main() { let p = Point::rand(); println!("({}, {})", p.x, p.y); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.21latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
rand-derive2 — cargo add rand-derive2 · libregistry