Struct crossbeam_channel::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: PartialEq> PartialEq for SendError<T>
[src]
fn eq(&self, __arg_0: &SendError<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SendError<T>) -> bool
[src]
This method tests for !=
.
impl<T: Eq> Eq for SendError<T>
[src]
impl<T: Clone> Clone for SendError<T>
[src]
fn clone(&self) -> SendError<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for SendError<T>
[src]
impl<T> Debug for SendError<T>
[src]
impl<T> Display for SendError<T>
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more