Struct random::Default[][src]

pub struct Default(_);

An instance of the default source.

The default source is the Xorshift128+ algorithm.

Implementations

impl Default[src]

pub fn new() -> Default[src]

Create an instance of the default source.

Each thread has its own copy of the default source, and each copy is initialized with the same default seed. Therefore, the usage is thread safe; however, each thread is responsible for reseeding its source.

pub fn seed(self, seed: [u64; 2]) -> Default[src]

Seed the source.

At least one bit of the seed should be nonzero.

Trait Implementations

impl Clone for Default[src]

impl Source for Default[src]

Auto Trait Implementations

impl !RefUnwindSafe for Default

impl !Send for Default

impl !Sync for Default

impl Unpin for Default

impl !UnwindSafe for Default

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.