Struct mx3::Mx3Rng [−][src]
pub struct Mx3Rng { /* fields omitted */ }
Pseudo-random number generator with 64-bits of state and cycle of 2^64.
This RNG is not cryptographically secure.
Implementations
impl Mx3Rng
[src]
impl Mx3Rng
[src]pub fn new(seed: u64) -> Self
[src]
Create the PRNG generator using the given seed.
Unlike Self::from_seed()
, this constructor does not modify the seed
before it is used and is equivalent to the reference constructor.
pub fn state(&self) -> u64
[src]
Return the state of the generator.
The generator can be resumed by passing the state as a seed to the
Self::new()
constructor.
Trait Implementations
impl SeedableRng for Mx3Rng
[src]
impl SeedableRng for Mx3Rng
[src]type Seed = [u8; 8]
Seed type, which is restricted to types mutably-dereferencable as u8
arrays (we recommend [u8; N]
for some N
). Read more
fn from_seed(seed: Self::Seed) -> Self
[src]
pub fn seed_from_u64(state: u64) -> Self
[src]
pub fn from_rng<R>(rng: R) -> Result<Self, Error> where
R: RngCore,
[src]
R: RngCore,
Auto Trait Implementations
impl RefUnwindSafe for Mx3Rng
impl RefUnwindSafe for Mx3Rng
impl UnwindSafe for Mx3Rng
impl UnwindSafe for Mx3Rng