pub enum TryRecvError {
    Empty,
    Disconnected,
}Expand description
An error that occurs when trying to receive a value from a channel when there are no messages in the channel.
If there are no messages in the channel and all senders are dropped, then the Disconnected error will be
returned.
Variants§
Empty
An error that occurs when trying to receive a value from an empty channel.
Disconnected
The channel has been closed because all senders have been dropped and there are no more messages waiting in the channel.
Trait Implementations§
Source§impl Clone for TryRecvError
 
impl Clone for TryRecvError
Source§fn clone(&self) -> TryRecvError
 
fn clone(&self) -> TryRecvError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for TryRecvError
 
impl Debug for TryRecvError
Source§impl Display for TryRecvError
 
impl Display for TryRecvError
Source§impl Error for TryRecvError
 
impl Error for TryRecvError
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 From<RecvError> for TryRecvError
 
impl From<RecvError> for TryRecvError
Source§impl PartialEq for TryRecvError
 
impl PartialEq for TryRecvError
impl Copy for TryRecvError
impl Eq for TryRecvError
impl StructuralPartialEq for TryRecvError
Auto Trait Implementations§
impl Freeze for TryRecvError
impl RefUnwindSafe for TryRecvError
impl Send for TryRecvError
impl Sync for TryRecvError
impl Unpin for TryRecvError
impl UnwindSafe for TryRecvError
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