pub trait Num{
    // Required method
    fn sample_open_closed_01<R: Rng + ?Sized>(rng: &mut R) -> Self;
}
Expand description

Numbers supported by generic items of this module.

Required Methods§

Source

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

Generate number between zero (exclusive) and one (inclusive).

This method is needed due to Rust issue #20671: it avoids having to add OpenClosed01: Distribution<T> bounds.

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.

Implementors§