Trait RandomGen

Source
pub trait RandomGen {
    // Provided methods
    fn gen_u32(&mut self) -> u32 { ... }
    fn gen_u64(&mut self) -> u64 { ... }
    fn gen_f32(&mut self) -> f32 { ... }
    fn gen_f64(&mut self) -> f64 { ... }
    fn fill_bytes(&mut self, bs: &mut [u8]) { ... }
    fn gen<A: Random>(&mut self) -> A { ... }
}

Provided Methods§

Source

fn gen_u32(&mut self) -> u32

Source

fn gen_u64(&mut self) -> u64

Source

fn gen_f32(&mut self) -> f32

Source

fn gen_f64(&mut self) -> f64

Source

fn fill_bytes(&mut self, bs: &mut [u8])

Source

fn gen<A: Random>(&mut self) -> A

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, G: RandomGen> RandomGen for &'a mut G

Source§

fn gen_u32(&mut self) -> u32

Source§

fn gen_u64(&mut self) -> u64

Source§

fn gen_f32(&mut self) -> f32

Source§

fn gen_f64(&mut self) -> f64

Source§

fn fill_bytes(&mut self, bs: &mut [u8])

Implementors§