Enum nakamoto_p2p::protocol::DisconnectReason[][src]

pub enum DisconnectReason {
    PeerMisbehaving(&'static str),
    PeerProtocolVersion(u32),
    PeerServices(ServiceFlags),
    PeerHeight(Height),
    PeerMagic(u32),
    PeerTimeout,
    SelfConnection,
    ConnectionLimit,
    ConnectionError(String),
    Command,
}

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(Height)

Peer chain is too far behind.

PeerMagic(u32)

Peer magic is invalid.

PeerTimeout

Peer timed out.

SelfConnection

Connection to self was detected.

ConnectionLimit

Inbound connection limit reached.

ConnectionError(String)

Error with the underlying connection.

Command

Peer was forced to disconnect by external command.

Implementations

impl DisconnectReason[src]

pub fn is_transient(&self) -> bool[src]

Check whether the disconnect reason is transient, ie. may no longer be applicable after some time.

Trait Implementations

impl Clone for DisconnectReason[src]

impl Debug for DisconnectReason[src]

impl Display for DisconnectReason[src]

impl Eq for DisconnectReason[src]

impl PartialEq<DisconnectReason> for DisconnectReason[src]

impl StructuralEq for DisconnectReason[src]

impl StructuralPartialEq for DisconnectReason[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.