[][src]Struct rand::StdRng

pub struct StdRng { /* fields omitted */ }

The standard RNG. This is designed to be efficient on the current platform.

Methods

impl StdRng[src]

pub fn new() -> Result<StdRng>[src]

Create a randomly seeded instance of StdRng.

This is a very expensive operation as it has to read randomness from the operating system and use this in an expensive seeding operation. If one is only generating a small number of random numbers, or doesn't need the utmost speed for generating each number, thread_rng and/or random may be more appropriate.

Reading the randomness from the OS may fail, and any error is propagated via the io::Result return value.

Trait Implementations

impl Rng for StdRng[src]

impl<'a> SeedableRng<&'a [usize]> for StdRng[src]

impl Clone for StdRng[src]

impl Copy for StdRng[src]

impl Debug for StdRng[src]

Auto Trait Implementations

impl Send for StdRng

impl Unpin for StdRng

impl Sync for StdRng

impl UnwindSafe for StdRng

impl RefUnwindSafe for StdRng

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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