The standard RNG. This is designed to be efficient on the current platform.
Create a randomly seeded instance of
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,
random may be more
Reading the randomness from the OS may fail, and any error is
propagated via the
io::Result return value.
fn fill_bytes(&mut self, dest: &mut [u8])[src]
fn gen_range<T: PartialOrd + SampleRange>(&mut self, low: T, high: T) -> T where[src]
fn gen_weighted_bool(&mut self, n: u32) -> bool where[src]
fn gen_ascii_chars<'a>(&'a mut self) -> AsciiGenerator<'a, Self>ⓘ where[src]
fn choose_mut<'a, T>(&mut self, values: &'a mut [T]) -> Option<&'a mut T> where[src]
impl<'a> SeedableRng<&'a [usize]> for StdRng[src]
Auto Trait Implementations
impl RefUnwindSafe for StdRng
impl UnwindSafe for StdRng
type Owned = T
The resulting type after obtaining ownership.
pub fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.