Struct zellij_utils::channels::SendError [−]
pub struct SendError<T>(pub T);
Expand description
An error returned from the send
method.
The message could not be sent because the channel is disconnected.
The error contains the message so it can be recovered.
Implementations
impl<T> SendError<T>
impl<T> SendError<T>
pub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwraps the message.
Examples
use crossbeam_channel::unbounded; let (s, r) = unbounded(); drop(r); if let Err(err) = s.send("foo") { assert_eq!(err.into_inner(), "foo"); }
Trait Implementations
impl<T> StructuralEq for SendError<T>
impl<T> StructuralPartialEq for SendError<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for SendError<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for SendError<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more