Enum libp2p::swarm::ProtocolsHandlerUpgrErr
source · [−]pub enum ProtocolsHandlerUpgrErr<TUpgrErr> {
Timeout,
Timer,
Upgrade(UpgradeError<TUpgrErr>),
}
Expand description
Error that can happen on an outbound substream opening attempt.
Variants
Timeout
The opening attempt timed out before the negotiation was fully completed.
Timer
There was an error in the timer used.
Upgrade(UpgradeError<TUpgrErr>)
Error while upgrading the substream to the protocol we want.
Implementations
sourceimpl<TUpgrErr> ProtocolsHandlerUpgrErr<TUpgrErr>
impl<TUpgrErr> ProtocolsHandlerUpgrErr<TUpgrErr>
sourcepub fn map_upgrade_err<F, E>(self, f: F) -> ProtocolsHandlerUpgrErr<E> where
F: FnOnce(UpgradeError<TUpgrErr>) -> UpgradeError<E>,
pub fn map_upgrade_err<F, E>(self, f: F) -> ProtocolsHandlerUpgrErr<E> where
F: FnOnce(UpgradeError<TUpgrErr>) -> UpgradeError<E>,
Map the inner UpgradeError
type.
Trait Implementations
sourceimpl<TUpgrErr> Debug for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: Debug,
impl<TUpgrErr> Debug for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: Debug,
sourceimpl<TUpgrErr> Display for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: Display,
impl<TUpgrErr> Display for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: Display,
sourceimpl<TUpgrErr> Error for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: 'static + Error,
impl<TUpgrErr> Error for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: 'static + Error,
sourcepub fn source(&self) -> Option<&(dyn Error + 'static)>
pub 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<ProtocolsHandlerUpgrErr<Error>> for KademliaHandlerQueryErr
impl From<ProtocolsHandlerUpgrErr<Error>> for KademliaHandlerQueryErr
sourcepub fn from(err: ProtocolsHandlerUpgrErr<Error>) -> KademliaHandlerQueryErr
pub fn from(err: ProtocolsHandlerUpgrErr<Error>) -> KademliaHandlerQueryErr
Performs the conversion.
Auto Trait Implementations
impl<TUpgrErr> RefUnwindSafe for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: RefUnwindSafe,
impl<TUpgrErr> Send for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: Send,
impl<TUpgrErr> Sync for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: Sync,
impl<TUpgrErr> Unpin for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: Unpin,
impl<TUpgrErr> UnwindSafe for ProtocolsHandlerUpgrErr<TUpgrErr> where
TUpgrErr: 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