pub enum Random {
System(System),
Zero(Zero),
Xorshift(Xorshift),
ChaCha20(ChaCha20),
}Expand description
Any of the sources of randomness.
This is usually created from a RandomDesc. It defaults to the System randomness generator, which is not deterministic.
Variants§
System(System)
The random number generator of the system.
Zero(Zero)
Only zeroes.
Xorshift(Xorshift)
The xorshift generator with a seed.
ChaCha20(ChaCha20)
The ChaCha20 stream cipher with a key, also for the master passphrase mode.
Implementations§
Trait Implementations§
Source§impl RandomSource for Random
impl RandomSource for Random
Source§type Stream = Box<dyn RandomStream>
type Stream = Box<dyn RandomStream>
Underlying type of the streams of this randomness source.
Source§fn stream_boxed(&self, index: u64) -> Box<dyn RandomStream>
fn stream_boxed(&self, index: u64) -> Box<dyn RandomStream>
The stream with an index, as a trait object.
impl StructuralPartialEq for Random
Auto Trait Implementations§
impl Forget for Random
impl Freeze for Random
impl Move for Random
impl RefUnwindSafe for Random
impl Send for Random
impl Sync for Random
impl Unpin for Random
impl UnsafeUnpin for Random
impl UnwindSafe for Random
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more