Struct tiamat::OsRng [−][src]
pub struct OsRng(_);
RandomGen
that sources its randomness from the operating system.
Methods
impl OsRng
[src]
impl OsRng
Trait Implementations
impl RandomGen for OsRng
[src]
impl RandomGen for OsRng
fn gen_u32(&mut self) -> u32
[src]
fn gen_u32(&mut self) -> u32
Returns a (pseudo-)random, uniformly distributed u32
. Read more
fn gen_u64(&mut self) -> u64
[src]
fn gen_u64(&mut self) -> u64
Returns a (pseudo-)random, uniformly distributed u64
. Read more
fn fill_buffer(&mut self, buffer: &mut [u8])
[src]
fn fill_buffer(&mut self, buffer: &mut [u8])
Fills the buffer with (pseudo-)random bytes. Read more
fn gen<R: Random>(&mut self) -> R where
Self: Sized,
[src]
fn gen<R: Random>(&mut self) -> R where
Self: Sized,
Generates a random value. Read more
fn build<B, R>(&mut self, builder: &B) -> R where
B: BuildRandom<R>,
Self: Sized,
[src]
fn build<B, R>(&mut self, builder: &B) -> R where
B: BuildRandom<R>,
Self: Sized,
Generates a random value according to some specification. Read more
fn choose_from<'a, T>(&mut self, xs: &'a [T]) -> &'a T where
Self: Sized,
[src]
fn choose_from<'a, T>(&mut self, xs: &'a [T]) -> &'a T where
Self: Sized,
Chooses a random element from the slice, where each element has the same probability of being chosen. Read more
ⓘImportant traits for IterGen<'a, G, R>fn iter_gen<R: Random>(&mut self) -> IterGen<Self, R> where
Self: Sized,
[src]
ⓘImportant traits for IterGen<'a, G, R>
fn iter_gen<R: Random>(&mut self) -> IterGen<Self, R> where
Self: Sized,
Returns an iterator over randomly generated values. Read more
ⓘImportant traits for IterBuild<'a, G, B, R>fn iter_build<'a, B: 'a, R>(
&'a mut self,
builder: &'a B
) -> IterBuild<'a, Self, B, R> where
B: BuildRandom<R>,
Self: Sized,
[src]
ⓘImportant traits for IterBuild<'a, G, B, R>
fn iter_build<'a, B: 'a, R>(
&'a mut self,
builder: &'a B
) -> IterBuild<'a, Self, B, R> where
B: BuildRandom<R>,
Self: Sized,
Returns an iterator over randomly built values. Read more
ⓘImportant traits for IterChooseFrom<'a, G, T>fn iter_choose_from<'a, T>(
&'a mut self,
xs: &'a [T]
) -> IterChooseFrom<'a, Self, T> where
Self: Sized,
[src]
ⓘImportant traits for IterChooseFrom<'a, G, T>
fn iter_choose_from<'a, T>(
&'a mut self,
xs: &'a [T]
) -> IterChooseFrom<'a, Self, T> where
Self: Sized,
Returns an iterator over values randomly chosen from a slice. Read more