pub struct Queue<T> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<T> Queue<T> for Queue<T>where
T: Ord,
impl<T> Queue<T> for Queue<T>where
T: Ord,
fn push_lazy( &mut self, value: &mut dyn Pushable<T>, ) -> Result<Option<T>, PushError>
fn push_with_notify( &mut self, value: &mut dyn Pushable<T>, cx: &mut Context<'_>, ) -> Result<Option<T>, PushError>
fn pop(&mut self) -> Result<T, PopError>
fn pop_with_notify(&mut self, cx: &mut Context<'_>) -> Result<T, PopError>
fn close(&mut self) -> Result<(), CloseError>
fn is_closed(&self) -> bool
fn is_empty(&self) -> bool
fn is_full(&self) -> bool
fn len(&self) -> usize
fn capacity(&self) -> Option<usize>
Source§fn push(&mut self, value: T) -> Result<Option<T>, (PushError, T)>
fn push(&mut self, value: T) -> Result<Option<T>, (PushError, T)>
Pushes
value
into the queue while returning it as an error if the operation failsfn check_push(&self) -> Result<(), PushError>
Auto Trait Implementations§
impl<T> Freeze for Queue<T>
impl<T> RefUnwindSafe for Queue<T>where
T: RefUnwindSafe,
impl<T> Send for Queue<T>where
T: Send,
impl<T> Sync for Queue<T>where
T: Sync,
impl<T> Unpin for Queue<T>where
T: Unpin,
impl<T> UnwindSafe for Queue<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
Source§impl<Q, T> InstantQueueExt<T> for Q
impl<Q, T> InstantQueueExt<T> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more