Skip to main content

Rand

Trait Rand 

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

This trait provides deterministic random generation over a user-provided RNG.

Required Methods§

Source

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

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 Rand for bool

Source§

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

Source§

impl Rand for char

Source§

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

Source§

impl Rand for f32

Source§

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

Source§

impl Rand for f64

Source§

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

Source§

impl Rand for i8

Source§

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

Source§

impl Rand for i16

Source§

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

Source§

impl Rand for i32

Source§

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

Source§

impl Rand for i64

Source§

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

Source§

impl Rand for i128

Source§

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

Source§

impl Rand for isize

Source§

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

Source§

impl Rand for u8

Source§

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

Source§

impl Rand for u16

Source§

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

Source§

impl Rand for u32

Source§

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

Source§

impl Rand for u64

Source§

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

Source§

impl Rand for u128

Source§

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

Source§

impl Rand for usize

Source§

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

Source§

impl<T: Rand, const N: usize> Rand for [T; N]

Source§

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

Implementors§