Trait random::Source[][src]

pub trait Source {
    fn read_u64(&mut self) -> u64;

    fn read_f64(&mut self) -> f64 { ... }
fn read<V>(&mut self) -> V
    where
        Self: Sized,
        V: Value
, { ... }
fn iter<'l, V>(&'l mut self) -> Sequence<'l, Self, V>

Notable traits for Sequence<'l, S, V>

impl<'l, S, V> Iterator for Sequence<'l, S, V> where
    S: Source,
    V: Value
type Item = V;

    where
        Self: Sized,
        V: Value
, { ... } }

A source of randomness.

Required methods

fn read_u64(&mut self) -> u64[src]

Read u64 uniformly distributed over {0, 1, …, u64::MAX}.

Loading content...

Provided methods

fn read_f64(&mut self) -> f64[src]

Read f64 uniformly distributed over [0, 1].

fn read<V>(&mut self) -> V where
    Self: Sized,
    V: Value
[src]

Read a random value.

fn iter<'l, V>(&'l mut self) -> Sequence<'l, Self, V>

Notable traits for Sequence<'l, S, V>

impl<'l, S, V> Iterator for Sequence<'l, S, V> where
    S: Source,
    V: Value
type Item = V;
where
    Self: Sized,
    V: Value
[src]

Read a sequence of random values.

Loading content...

Implementors

impl Source for Default[src]

impl Source for Xorshift128Plus[src]

Loading content...