Struct ergo_sync::ch::SendError
[−]
[src]
pub struct SendError<T>(pub T);
An error returned from the Sender::send
method.
A send operation can only fail if the receiving end of a channel is disconnected, implying that the data could never be received. The error contains the data being sent as a payload so it can be recovered.
Methods
impl<T> SendError<T>
[src]
fn into_inner(self) -> T
[src]
Unwraps the value.
Examples
use crossbeam_channel::unbounded; let (tx, rx) = unbounded(); drop(rx); if let Err(err) = tx.send("foo") { assert_eq!(err.into_inner(), "foo"); }
Trait Implementations
impl<T> Copy for SendError<T> where
T: Copy,
[src]
T: Copy,
impl<T> Error for SendError<T> where
T: Send,
[src]
T: Send,
impl<T> Clone for SendError<T> where
T: Clone,
[src]
T: Clone,
impl<T> Eq for SendError<T> where
T: Eq,
[src]
T: Eq,
impl<T> PartialEq<SendError<T>> for SendError<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,