Function urandom::new

source ·
pub fn new() -> Random<impl Rng + Clone>Notable traits for Random<R>impl<R: Rng> Read for Random<R>
Expand description

Creates a new instance of the default pseudorandom number generator.

The generator is seeded securely from the system entropy source.

Examples

let mut rng = urandom::new();
let value: i32 = rng.next();