pub struct TimerEntry<T> { /* private fields */ }
Expand description
A queue for managing multiple entries under a specified timestamp.
Implementations§
Source§impl<T> TimerEntry<T>
impl<T> TimerEntry<T>
Sourcepub fn get_timestamp(&self) -> u64
pub fn get_timestamp(&self) -> u64
Get the timestamp.
Sourcepub fn pop_front(&mut self) -> Option<T>
pub fn pop_front(&mut self) -> Option<T>
Removes the first element and returns it, or None
if the deque is empty.
Sourcepub fn remove(&mut self, t: &T) -> Option<T>where
T: Ord,
pub fn remove(&mut self, t: &T) -> Option<T>where
T: Ord,
Removes and returns the t
from the deque.
Whichever end is closer to the removal point will be moved to make
room, and all the affected elements will be moved to new positions.
Returns None
if t
not found.
Trait Implementations§
Source§impl<T: Debug> Debug for TimerEntry<T>
impl<T: Debug> Debug for TimerEntry<T>
Source§impl<'t, T> IntoIterator for &'t TimerEntry<T>
impl<'t, T> IntoIterator for &'t TimerEntry<T>
Source§impl<'t, T> IntoIterator for &'t mut TimerEntry<T>
impl<'t, T> IntoIterator for &'t mut TimerEntry<T>
Source§impl<T: PartialEq> PartialEq for TimerEntry<T>
impl<T: PartialEq> PartialEq for TimerEntry<T>
impl<T: Eq> Eq for TimerEntry<T>
impl<T> StructuralPartialEq for TimerEntry<T>
Auto Trait Implementations§
impl<T> Freeze for TimerEntry<T>
impl<T> RefUnwindSafe for TimerEntry<T>where
T: RefUnwindSafe,
impl<T> Send for TimerEntry<T>where
T: Send,
impl<T> Sync for TimerEntry<T>where
T: Sync,
impl<T> Unpin for TimerEntry<T>where
T: Unpin,
impl<T> UnwindSafe for TimerEntry<T>where
T: 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