pub enum Error<E> {
Other(E),
WouldBlock,
}
Expand description
A non-blocking error
The main use of this enum is to add a WouldBlock
variant to an existing
error enum.
Variants
Other(E)
A different kind of error
WouldBlock
This operation requires blocking behavior to complete
Implementations
Trait Implementations
sourceimpl<E: Ord> Ord for Error<E>
impl<E: Ord> Ord for Error<E>
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<E: PartialEq> PartialEq<Error<E>> for Error<E>
impl<E: PartialEq> PartialEq<Error<E>> for Error<E>
sourceimpl<E: PartialOrd> PartialOrd<Error<E>> for Error<E>
impl<E: PartialOrd> PartialOrd<Error<E>> for Error<E>
sourcefn partial_cmp(&self, other: &Error<E>) -> Option<Ordering>
fn partial_cmp(&self, other: &Error<E>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<E: Copy> Copy for Error<E>
impl<E: Eq> Eq for Error<E>
impl<E> StructuralEq for Error<E>
impl<E> StructuralPartialEq for Error<E>
Auto Trait Implementations
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<E>where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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