pub enum SendError<T> {
Closed(T),
RemoteSend(SendErrorKind),
RemoteConnect(ConnectError),
RemoteListen(ListenerError),
RemoteForward,
}Expand description
An error occurred during sending over an mpsc channel.
Variants§
Closed(T)
The remote end closed the channel.
RemoteSend(SendErrorKind)
Sending to a remote endpoint failed.
RemoteConnect(ConnectError)
Connecting a sent channel failed.
RemoteListen(ListenerError)
Listening for a received channel failed.
RemoteForward
Forwarding at a remote endpoint to another remote endpoint failed.
Implementations§
Source§impl<T> SendError<T>
impl<T> SendError<T>
Sourcepub fn closed_reason(&self) -> Option<ClosedReason>
pub fn closed_reason(&self) -> Option<ClosedReason>
Returns the reason for why the channel has been disconnected.
Returns None if the error is not due to the channel being disconnected. Currently this can only happen if a serialization error occurred.
Sourcepub fn is_disconnected(&self) -> bool
pub fn is_disconnected(&self) -> bool
True, if the remote endpoint closed the channel, was dropped or the connection failed.
Sourcepub fn is_final(&self) -> bool
👎Deprecated: a remoc::rch::mpsc::SendError is always final
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.
Sourcepub fn without_item(self) -> SendError<()>
pub fn without_item(self) -> SendError<()>
Returns the error without the contained item.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for SendError<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for SendError<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SendError<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SendError<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Error for SendError<T>where
T: Debug,
impl<T> Error for SendError<T>where
T: Debug,
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
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<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 to this type from the input type.
Source§impl<T> SendErrorExt for SendError<T>
impl<T> SendErrorExt for SendError<T>
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.
Source§impl<T> Serialize for SendError<T>where
T: Serialize,
impl<T> Serialize for SendError<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<T> TryFrom<TrySendError<T>> for SendError<T>
impl<T> TryFrom<TrySendError<T>> for SendError<T>
Source§type Error = TrySendError<T>
type Error = TrySendError<T>
The type returned in the event of a conversion error.
Source§fn try_from(
err: TrySendError<T>,
) -> Result<SendError<T>, <SendError<T> as TryFrom<TrySendError<T>>>::Error>
fn try_from( err: TrySendError<T>, ) -> Result<SendError<T>, <SendError<T> as TryFrom<TrySendError<T>>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl<T> Freeze for SendError<T>where
T: Freeze,
impl<T> !RefUnwindSafe for SendError<T>
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>
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