pub struct DelayQueue {
conf: Arc<Config>,
inner: Arc<Mutex<Inner>>,
}Fields§
§conf: Arc<Config>§inner: Arc<Mutex<Inner>>Implementations§
Source§impl DelayQueue
impl DelayQueue
pub fn new(conf: Arc<Config>) -> Self
pub fn add(&self, s: Slot, i: MsgId, msg: Bytes, pol: RetryPolicy, now: Instant)
pub fn due(&self, now: Instant) -> Option<(Bytes, RetryPolicy)>
pub fn remove(&self, s: Slot, i: MsgId)
pub fn reset(&self, now: Instant)
pub fn gc(&self, s: Slot)
pub fn len(&self) -> usize
pub fn is_due(&self, now: Instant) -> bool
Trait Implementations§
Source§impl Clone for DelayQueue
impl Clone for DelayQueue
Source§fn clone(&self) -> DelayQueue
fn clone(&self) -> DelayQueue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DelayQueue
impl !RefUnwindSafe for DelayQueue
impl Send for DelayQueue
impl Sync for DelayQueue
impl Unpin for DelayQueue
impl UnsafeUnpin for DelayQueue
impl !UnwindSafe for DelayQueue
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