Struct naia_socket_shared::TimeQueue
source · [−]Expand description
A queue for items marked by time, will only ever pop items from the queue if the time
Implementations
sourceimpl<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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more