pub struct SendError<T> {
pub kind: SendErrorKind,
pub item: T,
}
Available on crate feature
rch
only.Expand description
An error that occurred during remote sending.
Fields§
§kind: SendErrorKind
Error kind.
item: T
Item that could not be sent.
Implementations§
source§impl<T> SendError<T>
impl<T> SendError<T>
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
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
Returns 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<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<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)>
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, TransportSinkError, TransportStreamError> From<SendError<T>> for ProvideError<TransportSinkError, TransportStreamError>
impl<T, TransportSinkError, TransportStreamError> From<SendError<T>> for ProvideError<TransportSinkError, TransportStreamError>
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.
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