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