Trait RandomSource
trait RandomSource
A source of randomness.
Required Methods
fn fill_bytes(self: &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. ARandomSourceis allowed to return different bytes for those two cases. For instance, this allows aRandomSourceto generate a word at a time and throw part of it away if not needed.