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§
Source§impl<TUpgrErr> ProtocolsHandlerUpgrErr<TUpgrErr>
impl<TUpgrErr> ProtocolsHandlerUpgrErr<TUpgrErr>
Sourcepub fn map_upgrade_err<F, E>(self, f: F) -> ProtocolsHandlerUpgrErr<E>
pub fn map_upgrade_err<F, E>(self, f: F) -> ProtocolsHandlerUpgrErr<E>
Map the inner UpgradeError
type.
Trait Implementations§
Source§impl<TUpgrErr: Debug> Debug for ProtocolsHandlerUpgrErr<TUpgrErr>
impl<TUpgrErr: Debug> Debug for ProtocolsHandlerUpgrErr<TUpgrErr>
Source§impl<TUpgrErr> Display for ProtocolsHandlerUpgrErr<TUpgrErr>where
TUpgrErr: Display,
impl<TUpgrErr> Display for ProtocolsHandlerUpgrErr<TUpgrErr>where
TUpgrErr: Display,
Source§impl<TUpgrErr> Error for ProtocolsHandlerUpgrErr<TUpgrErr>where
TUpgrErr: Error + 'static,
impl<TUpgrErr> Error for ProtocolsHandlerUpgrErr<TUpgrErr>where
TUpgrErr: Error + 'static,
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<TUpgrErr> Freeze for ProtocolsHandlerUpgrErr<TUpgrErr>where
TUpgrErr: Freeze,
impl<TUpgrErr> !RefUnwindSafe for ProtocolsHandlerUpgrErr<TUpgrErr>
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>
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> 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