Struct naia_socket_shared::TimeQueue
source · pub struct TimeQueue<T: Eq + PartialEq> { /* private fields */ }
Expand description
A queue for items marked by time, will only ever pop items from the queue if the time
Implementations§
source§impl<T: Eq + PartialEq> TimeQueue<T>
impl<T: Eq + PartialEq> TimeQueue<T>
sourcepub fn has_item(&self) -> bool
pub fn has_item(&self) -> bool
Returns whether or not there is an item that is ready to be returned
sourcepub fn pop_item(&mut self) -> Option<T>
pub fn pop_item(&mut self) -> Option<T>
Pops an item from the queue if the sufficient time has elapsed
sourcepub fn peek_entry(&self) -> Option<&ItemContainer<T>>
pub fn peek_entry(&self) -> Option<&ItemContainer<T>>
Peeks at the top level item container on the queue
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for TimeQueue<T>where
T: RefUnwindSafe,
impl<T> Send for TimeQueue<T>where
T: Send,
impl<T> Sync for TimeQueue<T>where
T: Sync,
impl<T> Unpin for TimeQueue<T>where
T: Unpin,
impl<T> UnwindSafe for TimeQueue<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