pub trait RandomGen<R: Rng> { fn random(r: &mut R) -> Self; }
A trait used for generating a random object with an RNG,
fn random(r: &mut R) -> Self
Return a random instance of the implementing type, from the specified RNG instance.
impl<R: Rng> RandomGen<R> for bool
impl<R: Rng> RandomGen<R> for f32
impl<R: Rng> RandomGen<R> for f64
impl<R: Rng> RandomGen<R> for i8
impl<R: Rng> RandomGen<R> for u8
impl<R: Rng> RandomGen<R> for i16
impl<R: Rng> RandomGen<R> for u16
impl<R: Rng> RandomGen<R> for i32
impl<R: Rng> RandomGen<R> for u32
impl<R: Rng> RandomGen<R> for i64
impl<R: Rng> RandomGen<R> for u64
impl<R: Rng> RandomGen<R> for i128
impl<R: Rng> RandomGen<R> for u128
impl<R: Rng> RandomGen<R> for isize
impl<R: Rng> RandomGen<R> for usize