pub enum ConnectionHandlerUpgrErr<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> ConnectionHandlerUpgrErr<TUpgrErr>
impl<TUpgrErr> ConnectionHandlerUpgrErr<TUpgrErr>
sourcepub fn map_upgrade_err<F, E>(self, f: F) -> ConnectionHandlerUpgrErr<E>where
F: FnOnce(UpgradeError<TUpgrErr>) -> UpgradeError<E>,
pub fn map_upgrade_err<F, E>(self, f: F) -> ConnectionHandlerUpgrErr<E>where F: FnOnce(UpgradeError<TUpgrErr>) -> UpgradeError<E>,
Map the inner UpgradeError
type.
Trait Implementations§
source§impl<TUpgrErr: Debug> Debug for ConnectionHandlerUpgrErr<TUpgrErr>
impl<TUpgrErr: Debug> Debug for ConnectionHandlerUpgrErr<TUpgrErr>
source§impl<TUpgrErr> Display for ConnectionHandlerUpgrErr<TUpgrErr>where
TUpgrErr: Display,
impl<TUpgrErr> Display for ConnectionHandlerUpgrErr<TUpgrErr>where TUpgrErr: Display,
source§impl<TUpgrErr> Error for ConnectionHandlerUpgrErr<TUpgrErr>where
TUpgrErr: Error + 'static,
impl<TUpgrErr> Error for ConnectionHandlerUpgrErr<TUpgrErr>where TUpgrErr: 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()
Auto Trait Implementations§
impl<TUpgrErr> !RefUnwindSafe for ConnectionHandlerUpgrErr<TUpgrErr>
impl<TUpgrErr> Send for ConnectionHandlerUpgrErr<TUpgrErr>where TUpgrErr: Send,
impl<TUpgrErr> Sync for ConnectionHandlerUpgrErr<TUpgrErr>where TUpgrErr: Sync,
impl<TUpgrErr> Unpin for ConnectionHandlerUpgrErr<TUpgrErr>where TUpgrErr: Unpin,
impl<TUpgrErr> !UnwindSafe for ConnectionHandlerUpgrErr<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