Struct aliri_tokens::jitter::RandomEarlyJitter
source · pub struct RandomEarlyJitter<R> { /* private fields */ }
Available on crate feature
rand
only.Expand description
Jitters a value earlier by a random amount
Times jittered by this type will have a value with a uniform distribution
in the interval (time - max_jitter, time]
.
Implementations§
source§impl RandomEarlyJitter<StdRng>
impl RandomEarlyJitter<StdRng>
sourcepub fn new(max_jitter: DurationSecs) -> Self
pub fn new(max_jitter: DurationSecs) -> Self
Constructs a new instance that will jitter times early up to max_jitter
.
Trait Implementations§
source§impl<R: Debug> Debug for RandomEarlyJitter<R>
impl<R: Debug> Debug for RandomEarlyJitter<R>
source§impl<R: Rng> JitterSource for RandomEarlyJitter<R>
impl<R: Rng> JitterSource for RandomEarlyJitter<R>
Auto Trait Implementations§
impl<R> Freeze for RandomEarlyJitter<R>where
R: Freeze,
impl<R> RefUnwindSafe for RandomEarlyJitter<R>where
R: RefUnwindSafe,
impl<R> Send for RandomEarlyJitter<R>where
R: Send,
impl<R> Sync for RandomEarlyJitter<R>where
R: Sync,
impl<R> Unpin for RandomEarlyJitter<R>where
R: Unpin,
impl<R> UnwindSafe for RandomEarlyJitter<R>where
R: UnwindSafe,
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