pub enum P2PHandshakeError {
HelloNotInHandshake,
NonHelloMessageInHandshake,
NoSharedCapabilities,
NoResponse,
Timeout,
Disconnected(DisconnectReason),
DecodeError(Error),
}Expand description
Errors when conducting a p2p handshake.
Variants§
HelloNotInHandshake
Hello message received/sent outside of handshake error.
NonHelloMessageInHandshake
Received a non-hello message when trying to handshake.
No capabilities shared with the peer.
NoResponse
No response received when sending out handshake.
Timeout
Handshake timed out.
Disconnected(DisconnectReason)
Disconnected by peer with a specific reason.
DecodeError(Error)
Error decoding a message during handshake.
Trait Implementations§
Source§impl Clone for P2PHandshakeError
impl Clone for P2PHandshakeError
Source§impl Debug for P2PHandshakeError
impl Debug for P2PHandshakeError
Source§impl Display for P2PHandshakeError
impl Display for P2PHandshakeError
impl Eq for P2PHandshakeError
Source§impl Error for P2PHandshakeError
impl Error for P2PHandshakeError
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()
Source§impl From<Error> for P2PHandshakeError
impl From<Error> for P2PHandshakeError
Source§impl From<P2PHandshakeError> for P2PStreamError
impl From<P2PHandshakeError> for P2PStreamError
Source§fn from(source: P2PHandshakeError) -> Self
fn from(source: P2PHandshakeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for P2PHandshakeError
impl PartialEq for P2PHandshakeError
impl StructuralPartialEq for P2PHandshakeError
Auto Trait Implementations§
impl Freeze for P2PHandshakeError
impl RefUnwindSafe for P2PHandshakeError
impl Send for P2PHandshakeError
impl Sync for P2PHandshakeError
impl Unpin for P2PHandshakeError
impl UnsafeUnpin for P2PHandshakeError
impl UnwindSafe for P2PHandshakeError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
HelloNotInHandshake: 0 bytesNonHelloMessageInHandshake: 0 bytesNoSharedCapabilities: 0 bytesNoResponse: 0 bytesTimeout: 0 bytesDisconnected: 9 bytesDecodeError: 24 bytes