#[repr(u8)]pub enum DisconnectReason {
Shutdown = 0,
Restart = 1,
ProtocolError = 2,
TransportFailure = 3,
ResourceExhaustion = 4,
SecurityViolation = 5,
ConfigurationChange = 6,
Timeout = 7,
Other = 255,
}Expand description
Reason for an orderly disconnect notification.
Variants§
Shutdown = 0
Normal shutdown (operator requested).
Restart = 1
Restarting (may reconnect soon).
ProtocolError = 2
Protocol error encountered.
TransportFailure = 3
Transport failure.
ResourceExhaustion = 4
Resource exhaustion (memory, connections).
SecurityViolation = 5
Authentication or security policy violation.
ConfigurationChange = 6
Configuration change (peer removed from config).
Timeout = 7
Timeout or keepalive failure.
Other = 255
Unspecified reason.
Implementations§
Trait Implementations§
Source§impl Clone for DisconnectReason
impl Clone for DisconnectReason
Source§fn clone(&self) -> DisconnectReason
fn clone(&self) -> DisconnectReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 for DisconnectReason
impl PartialEq for DisconnectReason
Source§fn eq(&self, other: &DisconnectReason) -> bool
fn eq(&self, other: &DisconnectReason) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DisconnectReason
impl Eq for DisconnectReason
impl StructuralPartialEq for DisconnectReason
Auto Trait Implementations§
impl Freeze for DisconnectReason
impl RefUnwindSafe for DisconnectReason
impl Send for DisconnectReason
impl Sync for DisconnectReason
impl Unpin for DisconnectReason
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more