pub struct ConnectionClosed;Expand description
Returned by Connection::receive when the underlying mpsc channel has been
closed (e.g. because the same remote address was re-registered via
Transport::create_connection). Callers can detect this via
anyhow::Error::downcast_ref::<ConnectionClosed>() and bail immediately
instead of spinning on retransmit.
Trait Implementations§
Source§impl Debug for ConnectionClosed
impl Debug for ConnectionClosed
Source§impl Display for ConnectionClosed
impl Display for ConnectionClosed
Source§impl Error for ConnectionClosed
impl Error for ConnectionClosed
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()
Auto Trait Implementations§
impl Freeze for ConnectionClosed
impl RefUnwindSafe for ConnectionClosed
impl Send for ConnectionClosed
impl Sync for ConnectionClosed
impl Unpin for ConnectionClosed
impl UnsafeUnpin for ConnectionClosed
impl UnwindSafe for ConnectionClosed
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