Skip to main content

Sample

Trait Sample 

Source
pub trait Sample<Support> {
    // Required method
    fn sample(&self, rng: &mut Rng) -> Support;
}

Required Methods§

Source

fn sample(&self, rng: &mut Rng) -> Support

Generate a pseudorandom element of Support using rng as the source of randomness.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§