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§
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)>
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.
1.0.0 · source§impl<T> PartialEq for SendError<T>where
T: PartialEq,
impl<T> PartialEq for SendError<T>where
T: PartialEq,
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T> Pointee for T
impl<T> Pointee for T
source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref