pub struct SendError<T> {
channel_ptr: NonNull<Channel<T>>,
}
Expand description
An error returned when trying to send on a closed channel. Returned from
Sender::send
if the corresponding Receiver
has already been dropped.
The message that could not be sent can be retreived again with SendError::into_inner
.
Fields§
§channel_ptr: NonNull<Channel<T>>
Implementations§
§impl<T> SendError<T>
impl<T> SendError<T>
pub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the error and returns the message that failed to be sent.
Trait Implementations§
§impl<T> Error for SendError<T>
impl<T> Error for SendError<T>
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.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl<T> Send for SendError<T>where T: Send,
impl<T> Sync for SendError<T>where T: Sync,
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SendError<T>
impl<T> Unpin for SendError<T>
impl<T> !UnwindSafe for SendError<T>
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
§impl<T, UT> HandleAlloc<UT> for Twhere
T: Send + Sync,
impl<T, UT> HandleAlloc<UT> for Twhere T: Send + Sync,
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>