Enum libp2p::swarm::PendingConnectionError
source · pub enum PendingConnectionError<TTransErr> {
Transport(TTransErr),
ConnectionLimit(ConnectionLimit),
Aborted,
WrongPeerId {
obtained: PeerId,
endpoint: ConnectedPoint,
},
IO(Error),
}
Expand description
Errors that can occur in the context of a pending Connection
.
Variants§
Transport(TTransErr)
An error occurred while negotiating the transport protocol(s) on a connection.
ConnectionLimit(ConnectionLimit)
The connection was dropped because the connection limit for a peer has been reached.
Aborted
Pending connection attempt has been aborted.
WrongPeerId
The peer identity obtained on the connection did not match the one that was expected or is the local one.
IO(Error)
An I/O error occurred on the connection.
Implementations§
source§impl<T> PendingConnectionError<T>
impl<T> PendingConnectionError<T>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> PendingConnectionError<U>
Trait Implementations§
source§impl<TTransErr> Debug for PendingConnectionError<TTransErr>where
TTransErr: Debug,
impl<TTransErr> Debug for PendingConnectionError<TTransErr>where TTransErr: Debug,
source§impl<TTransErr> Display for PendingConnectionError<TTransErr>where
TTransErr: Display + Debug,
impl<TTransErr> Display for PendingConnectionError<TTransErr>where TTransErr: Display + Debug,
source§impl<TTransErr> Error for PendingConnectionError<TTransErr>where
TTransErr: Error + 'static,
impl<TTransErr> Error for PendingConnectionError<TTransErr>where TTransErr: 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 From<PendingConnectionError<Vec<(Multiaddr, TransportError<Error>), Global>>> for DialError
impl From<PendingConnectionError<Vec<(Multiaddr, TransportError<Error>), Global>>> for DialError
source§fn from(
error: PendingConnectionError<Vec<(Multiaddr, TransportError<Error>), Global>>
) -> DialError
fn from( error: PendingConnectionError<Vec<(Multiaddr, TransportError<Error>), Global>> ) -> DialError
Converts to this type from the input type.
Auto Trait Implementations§
impl<TTransErr> !RefUnwindSafe for PendingConnectionError<TTransErr>
impl<TTransErr> Send for PendingConnectionError<TTransErr>where TTransErr: Send,
impl<TTransErr> Sync for PendingConnectionError<TTransErr>where TTransErr: Sync,
impl<TTransErr> Unpin for PendingConnectionError<TTransErr>where TTransErr: Unpin,
impl<TTransErr> !UnwindSafe for PendingConnectionError<TTransErr>
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