pub struct Delay<T: Timestamp, R: RelaxStrategy = Spin> { /* private fields */ }
Expand description
Object that can delay by some duration.
T
- Timestamp
that provides now
.
R
- RelaxStrategy
that provides a strategy to handle an idle.
Implementations§
Source§impl<T: Timestamp, R: RelaxStrategy> Delay<T, R>
impl<T: Timestamp, R: RelaxStrategy> Delay<T, R>
Sourcepub const fn new(duration: T::Duration) -> Self
pub const fn new(duration: T::Duration) -> Self
Creates a new Delay<T, R>
.
Sourcepub fn borrow_duration(&self) -> &T::Duration
pub fn borrow_duration(&self) -> &T::Duration
Borrow the duration of this Delay<T, R>
.
Sourcepub fn borrow_mut_duration(&mut self) -> &mut T::Duration
pub fn borrow_mut_duration(&mut self) -> &mut T::Duration
Borrow the mutable duration of this Delay<T, R>
.
Auto Trait Implementations§
impl<T, R> Freeze for Delay<T, R>
impl<T, R> RefUnwindSafe for Delay<T, R>
impl<T, R> Send for Delay<T, R>
impl<T, R> Sync for Delay<T, R>
impl<T, R> Unpin for Delay<T, R>
impl<T, R> UnwindSafe for Delay<T, R>
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