pub enum TryRecvError {
Empty,
Disconnected,
}
Expand description
An error returned from the try_recv
method.
Variants§
Empty
A message could not be received because the channel is empty.
If this is a zero-capacity channel, then the error indicates that there was no sender available to send a message at the time.
Disconnected
The message could not be received because the channel is empty and disconnected.
Implementations§
Source§impl TryRecvError
impl TryRecvError
Trait Implementations§
Source§impl Clone for TryRecvError
impl Clone for TryRecvError
Source§fn clone(&self) -> TryRecvError
fn clone(&self) -> TryRecvError
Returns a copy 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§fn from(err: RecvError) -> TryRecvError
fn from(err: RecvError) -> TryRecvError
Converts to this type from the input type.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Empty
: 0 bytesDisconnected
: 0 bytes