Trait RandConstruct

Source
pub trait RandConstruct {
    // Required methods
    fn random() -> Self;
    fn uniform() -> Self;
    fn random_with_rng<R>(rng: &mut R) -> Self
       where R: Rng + ?Sized;
}

Required Methods§

Source

fn random() -> Self

Source

fn uniform() -> Self

Source

fn random_with_rng<R>(rng: &mut R) -> Self
where R: Rng + ?Sized,

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 RandConstruct for f32

Source§

impl RandConstruct for f64

Source§

impl RandConstruct for i8

Source§

fn random() -> i8

Source§

fn uniform() -> i8

Source§

fn random_with_rng<R>(rng: &mut R) -> i8
where R: Rng + ?Sized,

Source§

impl RandConstruct for i16

Source§

impl RandConstruct for i32

Source§

impl RandConstruct for i64

Source§

impl RandConstruct for i128

Source§

impl RandConstruct for isize

Source§

impl RandConstruct for u8

Source§

fn random() -> u8

Source§

fn uniform() -> u8

Source§

fn random_with_rng<R>(rng: &mut R) -> u8
where R: Rng + ?Sized,

Source§

impl RandConstruct for u16

Source§

impl RandConstruct for u32

Source§

impl RandConstruct for u64

Source§

impl RandConstruct for u128

Source§

impl RandConstruct for usize

Source§

impl<T> RandConstruct for Option<T>
where T: RandConstruct,

Source§

fn random() -> Option<T>

Source§

fn uniform() -> Option<T>

Source§

fn random_with_rng<R>(rng: &mut R) -> Option<T>
where R: Rng + ?Sized,

Implementors§