Trait rand::Rand [] [src]

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

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.

Implementations on Foreign Types

impl<T> Rand for [T; 13] where
    T: Rand
[src]

impl<T> Rand for [T; 6] where
    T: Rand
[src]

impl<T> Rand for [T; 18] where
    T: Rand
[src]

impl<A> Rand for (A,) where
    A: Rand
[src]

impl Rand for u8
[src]

impl<T> Rand for [T; 7] where
    T: Rand
[src]

impl<A, B, C, D, E, F, G> Rand for (A, B, C, D, E, F, G) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand,
    E: Rand,
    F: Rand,
    G: Rand
[src]

impl<T> Rand for [T; 5] where
    T: Rand
[src]

impl<A, B, C> Rand for (A, B, C) where
    A: Rand,
    B: Rand,
    C: Rand
[src]

impl Rand for char
[src]

impl<T> Rand for [T; 31] where
    T: Rand
[src]

impl<T> Rand for [T; 17] where
    T: Rand
[src]

impl Rand for u32
[src]

impl<A, B, C, D, E> Rand for (A, B, C, D, E) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand,
    E: Rand
[src]

impl<T> Rand for Option<T> where
    T: Rand
[src]

impl<T> Rand for [T; 25] where
    T: Rand
[src]

impl<T> Rand for [T; 24] where
    T: Rand
[src]

impl Rand for f64
[src]

Generate a floating point number in the half-open interval [0,1).

See Closed01 for the closed interval [0,1], and Open01 for the open interval (0,1).

impl<T> Rand for [T; 26] where
    T: Rand
[src]

impl Rand for i16
[src]

impl<A, B, C, D, E, F, G, H, I, J, K> Rand for (A, B, C, D, E, F, G, H, I, J, K) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand,
    E: Rand,
    F: Rand,
    G: Rand,
    H: Rand,
    I: Rand,
    J: Rand,
    K: Rand
[src]

impl Rand for isize
[src]

impl Rand for i8
[src]

impl<A, B, C, D, E, F, G, H> Rand for (A, B, C, D, E, F, G, H) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand,
    E: Rand,
    F: Rand,
    G: Rand,
    H: Rand
[src]

impl<T> Rand for [T; 9] where
    T: Rand
[src]

impl<A, B, C, D, E, F, G, H, I, J> Rand for (A, B, C, D, E, F, G, H, I, J) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand,
    E: Rand,
    F: Rand,
    G: Rand,
    H: Rand,
    I: Rand,
    J: Rand
[src]

impl<T> Rand for [T; 12] where
    T: Rand
[src]

impl<T> Rand for [T; 20] where
    T: Rand
[src]

impl<A, B> Rand for (A, B) where
    A: Rand,
    B: Rand
[src]

impl Rand for u16
[src]

impl<A, B, C, D> Rand for (A, B, C, D) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand
[src]

impl<T> Rand for [T; 1] where
    T: Rand
[src]

impl<T> Rand for [T; 0]
[src]

impl Rand for f32
[src]

Generate a floating point number in the half-open interval [0,1).

See Closed01 for the closed interval [0,1], and Open01 for the open interval (0,1).

impl<T> Rand for [T; 19] where
    T: Rand
[src]

impl<A, B, C, D, E, F> Rand for (A, B, C, D, E, F) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand,
    E: Rand,
    F: Rand
[src]

impl<T> Rand for [T; 21] where
    T: Rand
[src]

impl<T> Rand for [T; 29] where
    T: Rand
[src]

impl<T> Rand for [T; 30] where
    T: Rand
[src]

impl Rand for usize
[src]

impl<T> Rand for [T; 4] where
    T: Rand
[src]

impl Rand for i32
[src]

impl<T> Rand for [T; 23] where
    T: Rand
[src]

impl Rand for ()
[src]

impl<T> Rand for [T; 2] where
    T: Rand
[src]

impl<T> Rand for [T; 14] where
    T: Rand
[src]

impl<T> Rand for [T; 15] where
    T: Rand
[src]

impl<T> Rand for [T; 8] where
    T: Rand
[src]

impl<T> Rand for [T; 22] where
    T: Rand
[src]

impl<T> Rand for [T; 3] where
    T: Rand
[src]

impl<T> Rand for [T; 28] where
    T: Rand
[src]

impl<A, B, C, D, E, F, G, H, I, J, K, L> Rand for (A, B, C, D, E, F, G, H, I, J, K, L) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand,
    E: Rand,
    F: Rand,
    G: Rand,
    H: Rand,
    I: Rand,
    J: Rand,
    K: Rand,
    L: Rand
[src]

impl Rand for bool
[src]

impl<T> Rand for [T; 11] where
    T: Rand
[src]

impl<T> Rand for [T; 27] where
    T: Rand
[src]

impl<A, B, C, D, E, F, G, H, I> Rand for (A, B, C, D, E, F, G, H, I) where
    A: Rand,
    B: Rand,
    C: Rand,
    D: Rand,
    E: Rand,
    F: Rand,
    G: Rand,
    H: Rand,
    I: Rand
[src]

impl<T> Rand for [T; 16] where
    T: Rand
[src]

impl<T> Rand for [T; 32] where
    T: Rand
[src]

impl Rand for u64
[src]

impl Rand for i64
[src]

impl<T> Rand for [T; 10] where
    T: Rand
[src]

Implementors