#[non_exhaustive]pub enum PushError<T> {
Full(T),
Closed(T),
}Expand description
The push failed; the item is handed back.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Full(T)
The queue is at capacity. Only a bounded Queue’s try_push reports this.
Closed(T)
The queue was closed; nothing will ever pop the item.
Implementations§
Source§impl<T> PushError<T>
impl<T> PushError<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Recover the item that failed to push.
Trait Implementations§
Source§impl<T> Error for PushError<T>
impl<T> Error for PushError<T>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl<T> Freeze for PushError<T>where
T: Freeze,
impl<T> RefUnwindSafe for PushError<T>where
T: RefUnwindSafe,
impl<T> Send for PushError<T>where
T: Send,
impl<T> Sync for PushError<T>where
T: Sync,
impl<T> Unpin for PushError<T>where
T: Unpin,
impl<T> UnsafeUnpin for PushError<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for PushError<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