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: TTrait Implementations
impl<T: Send> Error for SendError<T>
source
impl<T: Send> Error for SendError<T>
sourcefn description(&self) -> &str
source
fn description(&self) -> &str
source👎 Deprecated since 1.42.0:
use the Display impl or to_string()
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0 · source
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0 · sourceThe lower-level source of this error, if any. Read more
impl<T> From<SendError<T>> for TrySendError<T>
1.24.0 · source
impl<T> From<SendError<T>> for TrySendError<T>
1.24.0 · sourcefn from(err: SendError<T>) -> TrySendError<T>
source
fn from(err: SendError<T>) -> TrySendError<T>
sourceConverts 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.
impl<T: Copy> Copy for SendError<T>
sourceimpl<T: Eq> Eq for SendError<T>
sourceimpl<T> StructuralEq for SendError<T>
sourceimpl<T> StructuralPartialEq for SendError<T>
sourceAuto Trait Implementations
impl<T> RefUnwindSafe for SendError<T> where
T: RefUnwindSafe,
impl<T> Send for SendError<T> where
T: Send,
impl<T> Sync for SendError<T> where
T: Sync,
impl<T> Unpin for SendError<T> where
T: Unpin,
impl<T> UnwindSafe for SendError<T> where
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more