Struct rand::distributions::Standard
source · [−]pub struct Standard;
Expand description
A generic random value distribution, implemented for many primitive types. Usually generates values with a numerically uniform distribution, and with a range appropriate to the type.
Provided implementations
Assuming the provided Rng
is well-behaved, these implementations
generate values with the following ranges and distributions:
- Integers (
i32
,u32
,isize
,usize
, etc.): Uniformly distributed over all values of the type. char
: Uniformly distributed over all Unicode scalar values, i.e. all code points in the range0...0x10_FFFF
, except for the range0xD800...0xDFFF
(the surrogate code points). This includes unassigned/reserved code points.bool
: Generatesfalse
ortrue
, each with probability 0.5.- Floating point types (
f32
andf64
): Uniformly distributed in the half-open range[0, 1)
. See notes below. - Wrapping integers (
Wrapping<T>
), besides the type identical to their normal integer variants.
The Standard
distribution also supports generation of the following
compound types where all component types are supported:
- Tuples (up to 12 elements): each element is generated sequentially.
- Arrays (up to 32 elements): each element is generated sequentially;
see also
Rng::fill
which supports arbitrary array length for integer types and tends to be faster foru32
and smaller types. When usingrustc
≥ 1.51, enable themin_const_gen
feature to support arrays larger than 32 elements. Note thatRng::fill
andStandard
’s array support are not equivalent: the former is optimised for integer types (using fewer RNG calls for element types smaller than the RNG word size), while the latter supports any element type supported byStandard
. Option<T>
first generates abool
, and if true generates and returnsSome(value)
wherevalue: T
, otherwise returningNone
.
Custom implementations
The Standard
distribution may be implemented for user types as follows:
use rand::Rng;
use rand::distributions::{Distribution, Standard};
struct MyF32 {
x: f32,
}
impl Distribution<MyF32> for Standard {
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> MyF32 {
MyF32 { x: rng.gen() }
}
}
Example usage
use rand::prelude::*;
use rand::distributions::Standard;
let val: f32 = StdRng::from_entropy().sample(Standard);
println!("f32 from [0, 1): {}", val);
Floating point implementation
The floating point implementations for Standard
generate a random value in
the half-open interval [0, 1)
, i.e. including 0 but not 1.
All values that can be generated are of the form n * ε/2
. For f32
the 24 most significant random bits of a u32
are used and for f64
the
53 most significant bits of a u64
are used. The conversion uses the
multiplicative method: (rng.gen::<$uty>() >> N) as $ty * (ε/2)
.
See also: Open01
which samples from (0, 1)
, OpenClosed01
which
samples from (0, 1]
and Rng::gen_range(0..1)
which also samples from
[0, 1)
. Note that Open01
uses transmute-based methods which yield 1 bit
less precision but may perform faster on some architectures (on modern Intel
CPUs all methods have approximately equal performance).
Trait Implementations
sourceimpl DistString for Standard
impl DistString for Standard
Note: the String
is potentially left with excess capacity; optionally the
user may call string.shrink_to_fit()
afterwards.
sourceimpl<T> Distribution<[T; 0]> for Standard
impl<T> Distribution<[T; 0]> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 0]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 0]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 1]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 1]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 1]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 1]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 10]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 10]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 10]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 10]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 11]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 11]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 11]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 11]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 12]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 12]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 12]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 12]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 13]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 13]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 13]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 13]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 14]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 14]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 14]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 14]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 15]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 15]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 15]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 15]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 16]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 16]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 16]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 16]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 17]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 17]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 17]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 17]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 18]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 18]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 18]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 18]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 19]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 19]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 19]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 19]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 2]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 2]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 2]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 2]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 20]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 20]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 20]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 20]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 21]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 21]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 21]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 21]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 22]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 22]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 22]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 22]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 23]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 23]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 23]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 23]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 24]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 24]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 24]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 24]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 25]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 25]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 25]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 25]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 26]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 26]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 26]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 26]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 27]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 27]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 27]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 27]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 28]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 28]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 28]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 28]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 29]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 29]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 29]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 29]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 3]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 3]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 3]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 3]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 30]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 30]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 30]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 30]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 31]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 31]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 31]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 31]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 32]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 32]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 32]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 32]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 4]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 4]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 4]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 4]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 5]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 5]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 5]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 5]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 6]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 6]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 6]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 6]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 7]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 7]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 7]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 7]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 8]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 8]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 8]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 8]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<[T; 9]> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<[T; 9]> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 9]
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> [T; 9]
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<()> for Standard
impl Distribution<()> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, _: &mut R)
fn sample<R: Rng + ?Sized>(&self, _: &mut R)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D, E, F, G, H, I, J, K, L> Distribution<(A, B, C, D, E, F, G, H, I, J, K, L)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
Standard: Distribution<I>,
Standard: Distribution<J>,
Standard: Distribution<K>,
Standard: Distribution<L>,
impl<A, B, C, D, E, F, G, H, I, J, K, L> Distribution<(A, B, C, D, E, F, G, H, I, J, K, L)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
Standard: Distribution<I>,
Standard: Distribution<J>,
Standard: Distribution<K>,
Standard: Distribution<L>,
sourcefn sample<R: Rng + ?Sized>(
&self,
_rng: &mut R
) -> (A, B, C, D, E, F, G, H, I, J, K, L)
fn sample<R: Rng + ?Sized>(
&self,
_rng: &mut R
) -> (A, B, C, D, E, F, G, H, I, J, K, L)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D, E, F, G, H, I, J, K> Distribution<(A, B, C, D, E, F, G, H, I, J, K)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
Standard: Distribution<I>,
Standard: Distribution<J>,
Standard: Distribution<K>,
impl<A, B, C, D, E, F, G, H, I, J, K> Distribution<(A, B, C, D, E, F, G, H, I, J, K)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
Standard: Distribution<I>,
Standard: Distribution<J>,
Standard: Distribution<K>,
sourcefn sample<R: Rng + ?Sized>(
&self,
_rng: &mut R
) -> (A, B, C, D, E, F, G, H, I, J, K)
fn sample<R: Rng + ?Sized>(
&self,
_rng: &mut R
) -> (A, B, C, D, E, F, G, H, I, J, K)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D, E, F, G, H, I, J> Distribution<(A, B, C, D, E, F, G, H, I, J)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
Standard: Distribution<I>,
Standard: Distribution<J>,
impl<A, B, C, D, E, F, G, H, I, J> Distribution<(A, B, C, D, E, F, G, H, I, J)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
Standard: Distribution<I>,
Standard: Distribution<J>,
sourcefn sample<R: Rng + ?Sized>(
&self,
_rng: &mut R
) -> (A, B, C, D, E, F, G, H, I, J)
fn sample<R: Rng + ?Sized>(
&self,
_rng: &mut R
) -> (A, B, C, D, E, F, G, H, I, J)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D, E, F, G, H, I> Distribution<(A, B, C, D, E, F, G, H, I)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
Standard: Distribution<I>,
impl<A, B, C, D, E, F, G, H, I> Distribution<(A, B, C, D, E, F, G, H, I)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
Standard: Distribution<I>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E, F, G, H, I)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E, F, G, H, I)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D, E, F, G, H> Distribution<(A, B, C, D, E, F, G, H)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
impl<A, B, C, D, E, F, G, H> Distribution<(A, B, C, D, E, F, G, H)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
Standard: Distribution<H>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E, F, G, H)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E, F, G, H)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D, E, F, G> Distribution<(A, B, C, D, E, F, G)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
impl<A, B, C, D, E, F, G> Distribution<(A, B, C, D, E, F, G)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
Standard: Distribution<G>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E, F, G)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E, F, G)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D, E, F> Distribution<(A, B, C, D, E, F)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
impl<A, B, C, D, E, F> Distribution<(A, B, C, D, E, F)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
Standard: Distribution<F>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E, F)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E, F)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D, E> Distribution<(A, B, C, D, E)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
impl<A, B, C, D, E> Distribution<(A, B, C, D, E)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
Standard: Distribution<E>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D, E)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C, D> Distribution<(A, B, C, D)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
impl<A, B, C, D> Distribution<(A, B, C, D)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
Standard: Distribution<D>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C, D)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B, C> Distribution<(A, B, C)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
impl<A, B, C> Distribution<(A, B, C)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
Standard: Distribution<C>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B, C)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A, B> Distribution<(A, B)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
impl<A, B> Distribution<(A, B)> for Standard where
Standard: Distribution<A>,
Standard: Distribution<B>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A, B)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A> Distribution<(A,)> for Standard where
Standard: Distribution<A>,
impl<A> Distribution<(A,)> for Standard where
Standard: Distribution<A>,
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A,)
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> (A,)
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<NonZeroU128> for Standard
impl Distribution<NonZeroU128> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU128
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU128
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<NonZeroU16> for Standard
impl Distribution<NonZeroU16> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU16
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU16
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<NonZeroU32> for Standard
impl Distribution<NonZeroU32> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU32
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU32
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<NonZeroU64> for Standard
impl Distribution<NonZeroU64> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU64
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU64
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<NonZeroU8> for Standard
impl Distribution<NonZeroU8> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU8
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroU8
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<NonZeroUsize> for Standard
impl Distribution<NonZeroUsize> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroUsize
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> NonZeroUsize
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<Option<T>> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<Option<T>> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Option<T>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Option<T>
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> Distribution<Wrapping<T>> for Standard where
Standard: Distribution<T>,
impl<T> Distribution<Wrapping<T>> for Standard where
Standard: Distribution<T>,
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Wrapping<T>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Wrapping<T>
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<bool> for Standard
impl Distribution<bool> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> bool
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> bool
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<char> for Standard
impl Distribution<char> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> char
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> char
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<f32> for Standard
impl Distribution<f32> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f32
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f32
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<f64> for Standard
impl Distribution<f64> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f64
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f64
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<i128> for Standard
impl Distribution<i128> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i128
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i128
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<i16> for Standard
impl Distribution<i16> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i16
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i16
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<i32> for Standard
impl Distribution<i32> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i32
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i32
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<i64> for Standard
impl Distribution<i64> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i64
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i64
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<i8> for Standard
impl Distribution<i8> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i8
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> i8
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<isize> for Standard
impl Distribution<isize> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> isize
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> isize
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<u128> for Standard
impl Distribution<u128> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u128
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u128
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<u16> for Standard
impl Distribution<u16> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u16
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u16
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<u32> for Standard
impl Distribution<u32> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u32
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u32
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<u64> for Standard
impl Distribution<u64> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u64
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u64
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<u8> for Standard
impl Distribution<u8> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u8
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u8
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl Distribution<usize> for Standard
impl Distribution<usize> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> usize
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> usize
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘNotable traits for DistIter<D, R, T>impl<D, R, T> Iterator for DistIter<D, R, T> where
D: Distribution<T>,
R: Rng, type Item = T;
where
R: Rng,
Self: Sized,
D: Distribution<T>,
R: Rng, type Item = T;
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
impl Copy for Standard
Auto Trait Implementations
impl RefUnwindSafe for Standard
impl Send for Standard
impl Sync for Standard
impl Unpin for Standard
impl UnwindSafe for Standard
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more