pub trait Rng:
Debug
+ Send
+ Sync {
// Required method
fn next_u64(&self) -> u64;
// Provided method
fn next_u32(&self) -> u32 { ... }
}Expand description
Where pseudo-random values come from.
See the module documentation for why randomness is a dependency rather than something to reach for, and for the pattern to follow when a lot of randomness is needed.
Implementations are not cryptographically secure and must not be used to derive secrets, tokens or keys.