pub enum SendingResult {
Sent,
WeClosed,
PeerClosedOrDied,
Error,
}Expand description
Was the message successfully sent, or did it fail (and why)?
Variants§
Sent
The message was sent with success!
WeClosed
We (ourselves, not the peer) closed the connection before the message was entirely sent.
PeerClosedOrDied
The peer closed the connection (either intentionally or due to a panic/crash/shutdown) before the message was entirely received.
Error
An error occured which prevented the sending of the message.
Implementations§
Source§impl SendingResult
impl SendingResult
Sourcepub fn failed_due_to_connection_closed(&self) -> bool
pub fn failed_due_to_connection_closed(&self) -> bool
Has the message failed to be sent due to the connection being closed?
Ignoring such situation might be appropriate.
Sourcepub fn failed_due_to_error(&self) -> bool
pub fn failed_due_to_error(&self) -> bool
Has the message failed to be sent due to some error (and not due to the connection being closed)?
Auto Trait Implementations§
impl Freeze for SendingResult
impl RefUnwindSafe for SendingResult
impl Send for SendingResult
impl Sync for SendingResult
impl Unpin for SendingResult
impl UnwindSafe for SendingResult
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