pub trait Distribution<T> {
    // Required method
    fn sample<R>(&self, rng: &mut R, bits: u8) -> T
       where R: Rng + ?Sized;
}
Expand description

Types (distributions) that can be used to create a random instance of T.

Based on rand::distributions::Distribution.

Required Methods§

source

fn sample<R>(&self, rng: &mut R, bits: u8) -> T
where R: Rng + ?Sized,

Generate a random value of T, using rng as the source of randomness.

Object Safety§

This trait is not object safe.

Implementors§