Enum crossbeam_channel::TrySendError [−][src]
pub enum TrySendError<T> { Full(T), Disconnected(T), }
Expand description
An error returned from the try_send
method.
The error contains the message being sent so it can be recovered.
Variants
The message could not be sent because the channel is full.
If this is a zero-capacity channel, then the error indicates that there was no receiver available to receive the message at the time.
The message could not be sent because the channel is disconnected.
Implementations
Unwraps the message.
Examples
use crossbeam_channel::bounded; let (s, r) = bounded(0); if let Err(err) = s.try_send("foo") { assert_eq!(err.into_inner(), "foo"); }
Returns true
if the send operation failed because the channel is full.
Returns true
if the send operation failed because the channel is disconnected.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<T> RefUnwindSafe for TrySendError<T> where
T: RefUnwindSafe,
impl<T> Send for TrySendError<T> where
T: Send,
impl<T> Sync for TrySendError<T> where
T: Sync,
impl<T> Unpin for TrySendError<T> where
T: Unpin,
impl<T> UnwindSafe for TrySendError<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more