Enum cordyceps::mpsc_queue::TryDequeueError
source · pub enum TryDequeueError {
Empty,
Inconsistent,
Busy,
}
Expand description
Errors returned by MpscQueue::try_dequeue
and Consumer::try_dequeue
.
Variants§
Empty
No element was dequeued because the queue was empty.
Inconsistent
The queue is currently in an inconsistent state.
Since inconsistent states are very short-lived, the caller may want to try dequeueing a second time.
Busy
Another thread is currently calling MpscQueue::try_dequeue
or
MpscQueue::dequeue
, or owns a Consumer
or OwnedConsumer
handle.
This is a multi-producer, single-consumer queue, so only a single thread may dequeue elements at any given time.
Trait Implementations§
source§impl Debug for TryDequeueError
impl Debug for TryDequeueError
source§impl PartialEq for TryDequeueError
impl PartialEq for TryDequeueError
source§fn eq(&self, other: &TryDequeueError) -> bool
fn eq(&self, other: &TryDequeueError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TryDequeueError
impl StructuralEq for TryDequeueError
impl StructuralPartialEq for TryDequeueError
Auto Trait Implementations§
impl RefUnwindSafe for TryDequeueError
impl Send for TryDequeueError
impl Sync for TryDequeueError
impl Unpin for TryDequeueError
impl UnwindSafe for TryDequeueError
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