pub enum ChannelError<T> {
Full(T),
Disconnected(T),
Empty,
Timeout,
}Expand description
Error type for channel operations.
Variants§
Full(T)
Channel is full, item returned.
Disconnected(T)
Channel is disconnected, item returned.
Empty
Channel is empty.
Timeout
Operation timed out.
Trait Implementations§
Source§impl<T: Clone> Clone for ChannelError<T>
impl<T: Clone> Clone for ChannelError<T>
Source§fn clone(&self) -> ChannelError<T>
fn clone(&self) -> ChannelError<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for ChannelError<T>
impl<T: Debug> Debug for ChannelError<T>
Source§impl<T> Display for ChannelError<T>
impl<T> Display for ChannelError<T>
impl<T: Eq> Eq for ChannelError<T>
Source§impl<T: Debug> Error for ChannelError<T>
impl<T: Debug> Error for ChannelError<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()
Source§impl<T: PartialEq> PartialEq for ChannelError<T>
impl<T: PartialEq> PartialEq for ChannelError<T>
Source§fn eq(&self, other: &ChannelError<T>) -> bool
fn eq(&self, other: &ChannelError<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T: PartialEq> StructuralPartialEq for ChannelError<T>
Auto Trait Implementations§
impl<T> Freeze for ChannelError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ChannelError<T>where
T: RefUnwindSafe,
impl<T> Send for ChannelError<T>where
T: Send,
impl<T> Sync for ChannelError<T>where
T: Sync,
impl<T> Unpin for ChannelError<T>where
T: Unpin,
impl<T> UnsafeUnpin for ChannelError<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ChannelError<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