pub struct SendError<T>(pub T);
🔬This is a nightly-only experimental API. (
mpmc_channel
)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
🔬This is a nightly-only experimental API. (
mpmc_channel
)Trait Implementations§
1.0.0 · Source§impl<T> Error for SendError<T>
impl<T> Error for SendError<T>
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)>
Returns the lower-level source of this error, if any. Read more
Source§impl<T> From<SendError<T>> for SendTimeoutError<T>
impl<T> From<SendError<T>> for SendTimeoutError<T>
Source§fn from(err: SendError<T>) -> SendTimeoutError<T>
fn from(err: SendError<T>) -> SendTimeoutError<T>
Converts to this type from the input type.
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.
impl<T> Copy for SendError<T>where
T: Copy,
impl<T> Eq for SendError<T>where
T: Eq,
impl<T> StructuralPartialEq for SendError<T>
Auto Trait Implementations§
impl<T> Freeze for SendError<T>where
T: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more