Trait RangeExt

Source
pub trait RangeExt<T>{
    // Required methods
    fn random<R>(&self, rng: &mut R) -> T
       where R: Rng;
    fn clamp_value(&self, value: &mut T) -> T;
}

Required Methods§

Source

fn random<R>(&self, rng: &mut R) -> T
where R: Rng,

Source

fn clamp_value(&self, value: &mut T) -> T

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<T> RangeExt<T> for Range<T>

Source§

fn random<R>(&self, rng: &mut R) -> T
where R: Rng,

Source§

fn clamp_value(&self, value: &mut T) -> T

Implementors§