pub struct Mx3Rng { /* private fields */ }
Expand description
Pseudo-random number generator with 64-bits of state and cycle of 2^64.
This RNG is not cryptographically secure.
Implementations
sourceimpl Mx3Rng
impl Mx3Rng
sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Creates the PRNG generator using the given seed.
This constructor modifies the seed before it is used in manner that
is equivalent to the reference design constructor.
Self::from_seed()
uses a different seed mixing function.
sourcepub fn state(&self) -> u64
pub fn state(&self) -> u64
Return the state of the generator.
The generator can be resumed by passing the state to
Self::resume()
constructor.
Trait Implementations
sourceimpl RngCore for Mx3Rng
impl RngCore for Mx3Rng
sourcefn fill_bytes(&mut self, dest: &mut [u8])
fn fill_bytes(&mut self, dest: &mut [u8])
Fill dest
with random data. Read more
Auto Trait Implementations
impl RefUnwindSafe for Mx3Rng
impl Send for Mx3Rng
impl Sync for Mx3Rng
impl Unpin for Mx3Rng
impl UnwindSafe for Mx3Rng
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more