Trait rand::Rand [] [src]

pub trait Rand: Sized {
    fn rand<R: Rng>(rng: &mut R) -> Self;
}

A type that can be randomly generated using an Rng.

Built-in Implementations

This crate implements Rand for various primitive types. Assuming the provided Rng is well-behaved, these implementations generate values with the following ranges and distributions:

The following aggregate types also implement Rand as long as their component types implement it:

Required Methods

Generates a random instance of this type using the specified source of randomness.

Implementors