distributions:: range:: SampleRange
The helper trait for types that have a sensible way to sample
uniformly between two values. This should not be used directly,
and is only to facilitate
fn construct_range(low: Self, high: Self) -> Range<Self>
Range object that
requires. This should not ever be called directly, only via
Range::new, which will check that
low < high, so this
function doesn't have to repeat the check.
fn sample_range<R: Rng>(r: &Range<Self>, rng: &mut R) -> Self
Sample a value from the given
Range with the given
a source of randomness.