Enum libp2p_core::upgrade::NegotiationError
source · [−]pub enum NegotiationError {
ProtocolError(ProtocolError),
Failed,
}
Expand description
Error that can happen when negotiating a protocol with the remote.
Variants
ProtocolError(ProtocolError)
A protocol error occurred during the negotiation.
Failed
Protocol negotiation failed because no protocol could be agreed upon.
Trait Implementations
sourceimpl Debug for NegotiationError
impl Debug for NegotiationError
sourceimpl Display for NegotiationError
impl Display for NegotiationError
sourceimpl Error for NegotiationError
impl Error for NegotiationError
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<Error> for NegotiationError
impl From<Error> for NegotiationError
sourcepub fn from(err: Error) -> NegotiationError
pub fn from(err: Error) -> NegotiationError
Performs the conversion.
sourceimpl<E> From<NegotiationError> for UpgradeError<E>
impl<E> From<NegotiationError> for UpgradeError<E>
sourcefn from(e: NegotiationError) -> Self
fn from(e: NegotiationError) -> Self
Performs the conversion.
sourceimpl From<ProtocolError> for NegotiationError
impl From<ProtocolError> for NegotiationError
sourcepub fn from(err: ProtocolError) -> NegotiationError
pub fn from(err: ProtocolError) -> NegotiationError
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for NegotiationError
impl Send for NegotiationError
impl Sync for NegotiationError
impl Unpin for NegotiationError
impl UnwindSafe for NegotiationError
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