[][src]Struct sgx_rand::StdRng

pub struct StdRng { /* fields omitted */ }

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

Implementations

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

impl Copy for StdRng[src]

impl Debug for StdRng[src]

impl Rng for StdRng[src]

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

Auto Trait Implementations

impl RefUnwindSafe for StdRng

impl Send for StdRng

impl Sync for StdRng

impl Unpin for StdRng

impl UnwindSafe for StdRng

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.