SampleRange

Trait SampleRange 

Source
pub trait SampleRange<T> {
    // Required methods
    fn sample_single<R: Rng + ?Sized>(self, rng: &mut R) -> Result<T, RngError>;
    fn is_empty(&self) -> bool;
}

Required Methods§

Source

fn sample_single<R: Rng + ?Sized>(self, rng: &mut R) -> Result<T, RngError>

Source

fn is_empty(&self) -> bool

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 SampleRange<f32> for Range<f32>

Source§

impl SampleRange<f64> for Range<f64>

Source§

impl SampleRange<u32> for Range<u32>

Source§

impl SampleRange<u64> for Range<u64>

Source§

impl SampleRange<usize> for Range<usize>

Implementors§