pub enum DisconnectReason {
    PeerMisbehaving(&'static str),
    PeerProtocolVersion(u32),
    PeerServices(ServiceFlags),
    PeerHeight(Height),
    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(Height)

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

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

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.