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)
The connection handler produced an error.
Trait Implementations§
source§impl<THandlerErr> Debug for ConnectionError<THandlerErr>where
THandlerErr: Debug,
impl<THandlerErr> Debug for ConnectionError<THandlerErr>where THandlerErr: Debug,
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()
source§impl<THandlerErr> From<Error> for ConnectionError<THandlerErr>
impl<THandlerErr> From<Error> for ConnectionError<THandlerErr>
source§fn from(error: Error) -> ConnectionError<THandlerErr>
fn from(error: Error) -> ConnectionError<THandlerErr>
Converts to this type from the input type.
Auto Trait Implementations§
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