pub enum SendError {
Closed,
RemoteSend(SendErrorKind),
RemoteConnect(ConnectError),
RemoteListen(ListenerError),
RemoteForward,
}
Available on crate feature
rch
only.Expand description
An error occurred during sending over an mpsc channel.
Variants§
Closed
The receiver was dropped or the connection failed.
RemoteSend(SendErrorKind)
Sending to a remote endpoint failed.
RemoteConnect(ConnectError)
Connecting a sent channel failed.
RemoteListen(ListenerError)
Listening to a received channel failed.
RemoteForward
Forwarding at a remote endpoint to another remote endpoint failed.
Implementations§
source§impl SendError
impl SendError
sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
True, if the remote endpoint was dropped or the connection failed.
sourcepub fn is_disconnected(&self) -> bool
pub fn is_disconnected(&self) -> bool
True, if the remote endpoint was dropped or the connection failed.
sourcepub fn is_final(&self) -> bool
pub fn is_final(&self) -> bool
Returns whether the error is final, i.e. no further send operation can succeed.
sourcepub fn is_item_specific(&self) -> bool
pub fn is_item_specific(&self) -> bool
Whether the error is caused by the item to be sent.
Trait Implementations§
source§impl<'de> Deserialize<'de> for SendError
impl<'de> Deserialize<'de> for SendError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Error for SendError
impl Error for SendError
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()
source§impl SendErrorExt for SendError
impl SendErrorExt for SendError
source§fn is_disconnected(&self) -> bool
fn is_disconnected(&self) -> bool
Whether the remote endpoint closed the channel, was dropped or the connection failed.
source§fn is_final(&self) -> bool
fn is_final(&self) -> bool
Whether the error is final, i.e. no further send operation can succeed.
source§fn is_item_specific(&self) -> bool
fn is_item_specific(&self) -> bool
Whether the error is caused by the item to be sent.
Auto Trait Implementations§
impl Freeze for SendError
impl !RefUnwindSafe for SendError
impl Send for SendError
impl Sync for SendError
impl Unpin for SendError
impl !UnwindSafe for SendError
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