Struct rand::distributions::uniform::UniformDuration
source · pub struct UniformDuration {
mode: UniformDurationMode,
offset: u32,
}
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.
Fields§
§mode: UniformDurationMode
§offset: u32
Trait Implementations§
source§impl Clone for UniformDuration
impl Clone for UniformDuration
source§fn clone(&self) -> UniformDuration
fn clone(&self) -> UniformDuration
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UniformDuration
impl Debug for UniformDuration
source§impl UniformSampler for UniformDuration
impl UniformSampler for UniformDuration
source§fn new<B1, B2>(low_b: B1, high_b: B2) -> Self
fn new<B1, B2>(low_b: B1, high_b: B2) -> Self
Construct self, with inclusive lower bound and exclusive upper bound
[low, high)
. Read moresource§fn new_inclusive<B1, B2>(low_b: B1, high_b: B2) -> Self
fn new_inclusive<B1, B2>(low_b: B1, high_b: B2) -> Self
Construct self, with inclusive bounds
[low, high]
. Read moresource§fn sample_single<R: Rng + ?Sized, B1, B2>(
low: B1,
high: B2,
rng: &mut R,
) -> Self::X
fn sample_single<R: Rng + ?Sized, B1, B2>( low: B1, high: B2, rng: &mut R, ) -> Self::X
Sample a single value uniformly from a range with inclusive lower bound
and exclusive upper bound
[low, high)
. Read moreimpl Copy for UniformDuration
Auto Trait Implementations§
impl Freeze for UniformDuration
impl RefUnwindSafe for UniformDuration
impl Send for UniformDuration
impl Sync for UniformDuration
impl Unpin for UniformDuration
impl UnwindSafe for UniformDuration
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)