pub struct SendError<T>(pub T);
Expand description
An error returned from the Sender::send
or SyncSender::send
function on channels.
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.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T> Error for SendError<T>where
T: Send,
impl<T> Error for SendError<T>where T: Send,
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.24.0 · source§impl<T> From<SendError<T>> for TrySendError<T>
impl<T> From<SendError<T>> for TrySendError<T>
source§fn from(err: SendError<T>) -> TrySendError<T>
fn from(err: SendError<T>) -> TrySendError<T>
Converts a SendError<T>
into a TrySendError<T>
.
This conversion always returns a TrySendError::Disconnected
containing the data in the SendError<T>
.
No data is allocated on the heap.