Struct rand_distr::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
sourcepub fn clone(&self) -> UniformDuration
pub fn clone(&self) -> UniformDuration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UniformDuration
impl Debug for UniformDuration
sourceimpl UniformSampler for UniformDuration
impl UniformSampler for UniformDuration
sourcepub fn new<B1, B2>(low_b: B1, high_b: B2) -> UniformDuration where
B1: SampleBorrow<<UniformDuration as UniformSampler>::X>,
B2: SampleBorrow<<UniformDuration as UniformSampler>::X>,
pub fn new<B1, B2>(low_b: B1, high_b: B2) -> UniformDuration where
B1: SampleBorrow<<UniformDuration as UniformSampler>::X>,
B2: SampleBorrow<<UniformDuration as UniformSampler>::X>,
Construct self, with inclusive lower bound and exclusive upper bound
[low, high)
. Read more
sourcepub fn new_inclusive<B1, B2>(low_b: B1, high_b: B2) -> UniformDuration where
B1: SampleBorrow<<UniformDuration as UniformSampler>::X>,
B2: SampleBorrow<<UniformDuration as UniformSampler>::X>,
pub fn new_inclusive<B1, B2>(low_b: B1, high_b: B2) -> UniformDuration where
B1: SampleBorrow<<UniformDuration as UniformSampler>::X>,
B2: SampleBorrow<<UniformDuration as UniformSampler>::X>,
Construct self, with inclusive bounds [low, high]
. Read more
sourcefn sample_single<R, B1, B2>(low: B1, high: B2, rng: &mut R) -> Self::X where
R: Rng + ?Sized,
B1: SampleBorrow<Self::X>,
B2: SampleBorrow<Self::X>,
fn sample_single<R, B1, B2>(low: B1, high: B2, rng: &mut R) -> Self::X where
R: Rng + ?Sized,
B1: SampleBorrow<Self::X>,
B2: SampleBorrow<Self::X>,
Sample a single value uniformly from a range with inclusive lower bound
and exclusive upper bound [low, high)
. Read more
sourcefn sample_single_inclusive<R, B1, B2>(low: B1, high: B2, rng: &mut R) -> Self::X where
R: Rng + ?Sized,
B1: SampleBorrow<Self::X>,
B2: SampleBorrow<Self::X>,
fn sample_single_inclusive<R, B1, B2>(low: B1, high: B2, rng: &mut R) -> Self::X where
R: Rng + ?Sized,
B1: SampleBorrow<Self::X>,
B2: SampleBorrow<Self::X>,
Sample a single value uniformly from a range with inclusive lower bound
and inclusive upper bound [low, high]
. Read more
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more