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 copy 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<'de> Deserialize<'de> for DisconnectReason
impl<'de> Deserialize<'de> for DisconnectReason
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 PartialEq<DisconnectReason> for DisconnectReason
impl PartialEq<DisconnectReason> for DisconnectReason
source§fn eq(&self, other: &DisconnectReason) -> bool
fn eq(&self, other: &DisconnectReason) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DisconnectReason
impl Serialize for DisconnectReason
impl Eq for DisconnectReason
impl StructuralEq for DisconnectReason
impl StructuralPartialEq for DisconnectReason
Auto Trait Implementations§
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
§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.