pub enum DisconnectReason {
Show 15 variants
ExceededForkRange,
InvalidChallengeResponse,
InvalidForkDepth,
INeedToSyncFirst,
NoReasonGiven,
ProtocolViolation,
OutdatedClientVersion,
PeerHasDisconnected,
PeerRefresh,
ShuttingDown,
SyncComplete,
TooManyFailures,
TooManyPeers,
YouNeedToSyncFirst,
YourPortIsClosed(u16),
}
Expand description
The reason behind the node disconnecting from a peer.
Variants§
ExceededForkRange
The fork length limit was exceeded.
InvalidChallengeResponse
The peer’s challenge response is invalid.
InvalidForkDepth
The peer’s client uses an invalid fork depth.
INeedToSyncFirst
The node is a sync node and the peer is ahead.
NoReasonGiven
No reason given.
ProtocolViolation
The peer is not following the protocol.
OutdatedClientVersion
The peer’s client is outdated, judging by its version.
PeerHasDisconnected
Dropping a dead connection.
PeerRefresh
Dropping a connection for a periodic refresh.
ShuttingDown
The node is shutting down.
SyncComplete
The sync node has served its purpose.
TooManyFailures
The peer has caused too many failures.
TooManyPeers
The node has too many connections already.
YouNeedToSyncFirst
The peer is a sync node that’s behind our node, and it needs to sync itself first.
YourPortIsClosed(u16)
The peer’s listening port is closed.
Trait Implementations§
Source§impl Clone for DisconnectReason
impl Clone for DisconnectReason
Source§fn clone(&self) -> DisconnectReason
fn clone(&self) -> DisconnectReason
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DisconnectReason
impl Debug for DisconnectReason
Source§impl From<DisconnectReason> for Disconnect
impl From<DisconnectReason> for Disconnect
Source§fn from(reason: DisconnectReason) -> Self
fn from(reason: DisconnectReason) -> Self
Converts to this type from the input type.
Source§impl<N: Network> From<DisconnectReason> for Message<N>
impl<N: Network> From<DisconnectReason> for Message<N>
Source§fn from(reason: DisconnectReason) -> Self
fn from(reason: DisconnectReason) -> Self
Converts to this type from the input type.
Source§impl FromBytes for DisconnectReason
impl FromBytes for DisconnectReason
Source§impl PartialEq for DisconnectReason
impl PartialEq for DisconnectReason
Source§impl ToBytes for DisconnectReason
impl ToBytes for DisconnectReason
impl Copy for DisconnectReason
impl Eq for DisconnectReason
impl StructuralPartialEq for DisconnectReason
Auto Trait Implementations§
impl Freeze for DisconnectReason
impl RefUnwindSafe for DisconnectReason
impl Send for DisconnectReason
impl Sync for DisconnectReason
impl Unpin for DisconnectReason
impl UnwindSafe for DisconnectReason
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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