Struct futures_delay_queue::DelayQueue
source · pub struct DelayQueue<T: 'static, A: RingBuf<Item = T>> { /* private fields */ }
Expand description
A queue for managing delayed items.
Implementations§
source§impl<T, A> DelayQueue<T, A>
impl<T, A> DelayQueue<T, A>
sourcepub fn insert(&self, value: T, dur: Duration) -> DelayHandle
pub fn insert(&self, value: T, dur: Duration) -> DelayHandle
Inserts an item into the delay queue that will be yielded after dur
has passed.
sourcepub fn insert_at(&self, value: T, when: Instant) -> DelayHandle
pub fn insert_at(&self, value: T, when: Instant) -> DelayHandle
Inserts an item into the delay queue that will be yielded at when
.
Trait Implementations§
Auto Trait Implementations§
impl<T, A> !RefUnwindSafe for DelayQueue<T, A>
impl<T, A> Send for DelayQueue<T, A>
impl<T, A> Sync for DelayQueue<T, A>
impl<T, A> Unpin for DelayQueue<T, A>
impl<T, A> !UnwindSafe for DelayQueue<T, A>
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