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
sourceimpl Debug for TryDequeueError
impl Debug for TryDequeueError
sourceimpl PartialEq<TryDequeueError> for TryDequeueError
impl PartialEq<TryDequeueError> for TryDequeueError
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
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