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
sourceimpl<T> PendingConnectionError<T>
impl<T> PendingConnectionError<T>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> PendingConnectionError<U>
Trait Implementations
sourceimpl<TTransErr: Debug> Debug for PendingConnectionError<TTransErr>
impl<TTransErr: Debug> Debug for PendingConnectionError<TTransErr>
sourceimpl<TTransErr> Display for PendingConnectionError<TTransErr> where
TTransErr: Display + Debug,
impl<TTransErr> Display for PendingConnectionError<TTransErr> where
TTransErr: Display + Debug,
sourceimpl<TTransErr> Error for PendingConnectionError<TTransErr> where
TTransErr: Error + 'static,
impl<TTransErr> Error for PendingConnectionError<TTransErr> where
TTransErr: Error + 'static,
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<PendingConnectionError<Vec<(Multiaddr, TransportError<Error>), Global>>> for DialError
impl From<PendingConnectionError<Vec<(Multiaddr, TransportError<Error>), Global>>> for DialError
sourcefn from(error: PendingOutboundConnectionError<Error>) -> Self
fn from(error: PendingOutboundConnectionError<Error>) -> Self
Performs the conversion.
Auto Trait Implementations
impl<TTransErr> RefUnwindSafe for PendingConnectionError<TTransErr> where
TTransErr: RefUnwindSafe,
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> where
TTransErr: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more