Struct rand::distributions::uniform::UniformDuration
source · [−]pub struct UniformDuration { /* private fields */ }
Expand description
The back-end implementing UniformSampler
for Duration
.
Unless you are implementing UniformSampler
for your own types, this type
should not be used directly, use Uniform
instead.
Trait Implementations
sourceimpl Clone for UniformDuration
impl Clone for UniformDuration
sourcefn clone(&self) -> UniformDuration
fn clone(&self) -> UniformDuration
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for UniformDuration
impl Debug for UniformDuration
sourceimpl UniformSampler for UniformDuration
impl UniformSampler for UniformDuration
type X = Duration
type X = Duration
The type sampled by this implementation.
sourcefn new<B1, B2>(low_b: B1, high_b: B2) -> Selfwhere
B1: SampleBorrow<Self::X> + Sized,
B2: SampleBorrow<Self::X> + Sized,
fn new<B1, B2>(low_b: B1, high_b: B2) -> Selfwhere
B1: SampleBorrow<Self::X> + Sized,
B2: SampleBorrow<Self::X> + Sized,
Construct self, with inclusive lower bound and exclusive upper bound
[low, high)
. Read moresourcefn new_inclusive<B1, B2>(low_b: B1, high_b: B2) -> Selfwhere
B1: SampleBorrow<Self::X> + Sized,
B2: SampleBorrow<Self::X> + Sized,
fn new_inclusive<B1, B2>(low_b: B1, high_b: B2) -> Selfwhere
B1: SampleBorrow<Self::X> + Sized,
B2: SampleBorrow<Self::X> + Sized,
Construct self, with inclusive bounds
[low, high]
. Read moresourcefn sample_single<R: Rng + ?Sized, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> Self::Xwhere
B1: SampleBorrow<Self::X> + Sized,
B2: SampleBorrow<Self::X> + Sized,
fn sample_single<R: Rng + ?Sized, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> Self::Xwhere
B1: SampleBorrow<Self::X> + Sized,
B2: SampleBorrow<Self::X> + Sized,
Sample a single value uniformly from a range with inclusive lower bound
and exclusive upper bound
[low, high)
. Read moresourcefn sample_single_inclusive<R: Rng + ?Sized, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> Self::Xwhere
B1: SampleBorrow<Self::X> + Sized,
B2: SampleBorrow<Self::X> + Sized,
fn sample_single_inclusive<R: Rng + ?Sized, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> Self::Xwhere
B1: SampleBorrow<Self::X> + Sized,
B2: SampleBorrow<Self::X> + Sized,
Sample a single value uniformly from a range with inclusive lower bound
and inclusive upper bound
[low, high]
. Read moreimpl Copy for UniformDuration
Auto Trait Implementations
impl RefUnwindSafe for UniformDuration
impl Send for UniformDuration
impl Sync for UniformDuration
impl Unpin for UniformDuration
impl UnwindSafe for UniformDuration
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more