pub enum DisconnectReason {
PeerMisbehaving(&'static str),
PeerProtocolVersion(u32),
PeerServices(ServiceFlags),
PeerHeight(u64),
PeerMagic(u32),
PeerTimeout(&'static str),
PeerDropped,
SelfConnection,
ConnectionLimit,
DecodeError(Arc<Error>),
Command,
Other(&'static str),
}Expand description
Disconnect reason.
Variants
PeerMisbehaving(&'static str)
Peer is misbehaving.
PeerProtocolVersion(u32)
Peer protocol version is too old or too recent.
PeerServices(ServiceFlags)
Peer doesn’t have the required services.
PeerHeight(u64)
Peer chain is too far behind.
PeerMagic(u32)
Peer magic is invalid.
PeerTimeout(&'static str)
Peer timed out.
PeerDropped
Peer was dropped by all sub-protocols.
SelfConnection
Connection to self was detected.
ConnectionLimit
Inbound connection limit reached.
DecodeError(Arc<Error>)
Error trying to decode incoming message.
Command
Peer was forced to disconnect by external command.
Other(&'static str)
Peer was disconnected for another reason.
Implementations
impl DisconnectReason
impl DisconnectReason
pub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Check whether the disconnect reason is transient, ie. may no longer be applicable after some time.
Trait Implementations
impl Clone for DisconnectReason
impl Clone for DisconnectReason
fn clone(&self) -> DisconnectReason
fn clone(&self) -> DisconnectReason
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Debug for DisconnectReason
impl Debug 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more