Enum network::peer::DisconnectReason
source · pub enum DisconnectReason {
Requested,
ConnectionLost,
}
Expand description
The reason for closing a connection.
For example, if the remote peer closed the connection or the connection was
lost, the disconnect reason will be ConnectionLost
. In contrast, if the
PeerManager
requested us to close this
connection, then the disconnect reason will be Requested
.
Variants§
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 Display for DisconnectReason
impl Display for DisconnectReason
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 Copy 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<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.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>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.