Trait Rng
pub trait Rng
A source of randomness.
Required Methods
fn fill_bytes(&mut self, bytes: &mut [u8])Fills
byteswith random bytes.Note that calling
fill_bytesmultiple times is not equivalent to callingfill_bytesonce with a larger buffer. AnRngis allowed to return different bytes for those two cases. For instance, this allows anRngto generate a word at a time and throw part of it away if not needed.