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]

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 Clone for Mx3Rng[src]

impl Debug for Mx3Rng[src]

impl RngCore 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

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.