pub trait RandomSource {
// Required method
fn fill_bytes(&mut self, bytes: &mut [u8]);
}
random #130703)
A source of randomness.
fn fill_bytes(&mut self, bytes: &mut [u8])
random #130703)
Fills bytes with random bytes.
Note that calling fill_bytes multiple times is not equivalent to calling fill_bytes once with a larger buffer. A RandomSource is allowed to return different bytes for those two cases. For instance, this allows a RandomSource to generate a word at a time and throw part of it away if not needed.
impl RandomSource for DefaultRandomSource
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/random/trait.RandomSource.html