Enum libp2p_swarm::ConnectionError
source · pub enum ConnectionError<THandlerErr> {
IO(Error),
KeepAliveTimeout,
Handler(THandlerErr),
}
Expand description
Errors that can occur in the context of an established Connection
.
Variants§
IO(Error)
An I/O error occurred on the connection.
KeepAliveTimeout
The connection keep-alive timeout expired.
Handler(THandlerErr)
👎Deprecated: Will be removed together with
ConnectionHandlerEvent::Close
. See https://github.com/libp2p/rust-libp2p/issues/3591 for details.The connection handler produced an error.
Trait Implementations§
source§impl<THandlerErr: Debug> Debug for ConnectionError<THandlerErr>
impl<THandlerErr: Debug> Debug for ConnectionError<THandlerErr>
source§impl<THandlerErr> Display for ConnectionError<THandlerErr>where
THandlerErr: Display,
impl<THandlerErr> Display for ConnectionError<THandlerErr>where
THandlerErr: Display,
source§impl<THandlerErr> Error for ConnectionError<THandlerErr>where
THandlerErr: Error + 'static,
impl<THandlerErr> Error for ConnectionError<THandlerErr>where
THandlerErr: Error + 'static,
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()
Auto Trait Implementations§
impl<THandlerErr> Freeze for ConnectionError<THandlerErr>where
THandlerErr: Freeze,
impl<THandlerErr> !RefUnwindSafe for ConnectionError<THandlerErr>
impl<THandlerErr> Send for ConnectionError<THandlerErr>where
THandlerErr: Send,
impl<THandlerErr> Sync for ConnectionError<THandlerErr>where
THandlerErr: Sync,
impl<THandlerErr> Unpin for ConnectionError<THandlerErr>where
THandlerErr: Unpin,
impl<THandlerErr> !UnwindSafe for ConnectionError<THandlerErr>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more