pub enum DisconnectReason {
Show 16 variants
HostNotAllowedToConnect,
ProtocolError,
KeyExchangeFailed,
Reserved,
MacError,
CompressionError,
ServiceNotAvailable,
ProtocolVersionNotSupported,
HostKeyNotVerifiable,
ConnectionLost,
ByApplication,
TooManyConnections,
AuthCancelledByUser,
NoMoreAuthMethodsAvailable,
IllegalUserName,
Other(u32),
}Expand description
Set of possible disconnection reasons.
Variants§
HostNotAllowedToConnect
Standard RFC4253 disconnect reason.
ProtocolError
Standard RFC4253 disconnect reason.
KeyExchangeFailed
Standard RFC4253 disconnect reason.
Reserved
Standard RFC4253 disconnect reason.
MacError
Standard RFC4253 disconnect reason.
CompressionError
Standard RFC4253 disconnect reason.
ServiceNotAvailable
Standard RFC4253 disconnect reason.
ProtocolVersionNotSupported
Standard RFC4253 disconnect reason.
HostKeyNotVerifiable
Standard RFC4253 disconnect reason.
ConnectionLost
Standard RFC4253 disconnect reason.
ByApplication
Standard RFC4253 disconnect reason.
TooManyConnections
Standard RFC4253 disconnect reason.
AuthCancelledByUser
Standard RFC4253 disconnect reason.
NoMoreAuthMethodsAvailable
Standard RFC4253 disconnect reason.
IllegalUserName
Standard RFC4253 disconnect reason.
Other(u32)
Some other disconnect reason.
Implementations§
Source§impl DisconnectReason
impl DisconnectReason
Sourcepub fn decode_with(reader: &mut ObjectReader<'_>) -> Result<Self, ProtocolError>
pub fn decode_with(reader: &mut ObjectReader<'_>) -> Result<Self, ProtocolError>
Decodes an instance of this type from an object reader.
Sourcepub fn encode_with(
self,
writer: &mut ObjectWriter<'_>,
) -> Result<(), ProtocolError>
pub fn encode_with( self, writer: &mut ObjectWriter<'_>, ) -> Result<(), ProtocolError>
Encodes this instance into an object writer.
Sourcepub fn into_reason_code(self) -> u32
pub fn into_reason_code(self) -> u32
Retrieves the underlying reason code.
Sourcepub fn from_reason_code(reason_code: u32) -> Self
pub fn from_reason_code(reason_code: u32) -> Self
Constructs an instance of this type from a reason code.
Sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
Retrieves a description message for this disconnect reason instance.
Trait Implementations§
Source§impl Clone for DisconnectReason
impl Clone for DisconnectReason
Source§fn clone(&self) -> DisconnectReason
fn clone(&self) -> DisconnectReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more