#[non_exhaustive]pub enum Message {
Show 32 variants
KexInit(KexInit),
KexEcdhInit(KexEcdhInit),
KexEcdhReply(KexEcdhReply),
NewKeys(NewKeys),
ServiceRequest(ServiceRequest),
ServiceAccept(ServiceAccept),
Disconnect(Disconnect),
Ignore(Ignore),
Debug(Debug),
Unimplemented(Unimplemented),
ExtInfo(ExtInfo),
UserauthRequest(UserauthRequest),
UserauthFailure(UserauthFailure),
UserauthSuccess(UserauthSuccess),
UserauthBanner(UserauthBanner),
Ping(Ping),
Pong(Pong),
GlobalRequest(GlobalRequest),
RequestSuccess(RequestSuccess),
RequestFailure(RequestFailure),
ChannelOpen(ChannelOpen),
ChannelOpenConfirmation(ChannelOpenConfirmation),
ChannelOpenFailure(ChannelOpenFailure),
ChannelWindowAdjust(ChannelWindowAdjust),
ChannelData(ChannelData),
ChannelExtendedData(ChannelExtendedData),
ChannelEof(ChannelEof),
ChannelClose(ChannelClose),
ChannelRequest(ChannelRequest),
ChannelSuccess(ChannelSuccess),
ChannelFailure(ChannelFailure),
Unknown(u8),
}Expand description
A transport message, or the number of one this crate does not decode.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
KexInit(KexInit)
KexEcdhInit(KexEcdhInit)
KexEcdhReply(KexEcdhReply)
NewKeys(NewKeys)
ServiceRequest(ServiceRequest)
ServiceAccept(ServiceAccept)
Disconnect(Disconnect)
Ignore(Ignore)
Debug(Debug)
Unimplemented(Unimplemented)
ExtInfo(ExtInfo)
UserauthRequest(UserauthRequest)
UserauthFailure(UserauthFailure)
UserauthSuccess(UserauthSuccess)
UserauthBanner(UserauthBanner)
Ping(Ping)
Pong(Pong)
GlobalRequest(GlobalRequest)
RequestSuccess(RequestSuccess)
RequestFailure(RequestFailure)
ChannelOpen(ChannelOpen)
ChannelOpenConfirmation(ChannelOpenConfirmation)
ChannelOpenFailure(ChannelOpenFailure)
ChannelWindowAdjust(ChannelWindowAdjust)
ChannelData(ChannelData)
ChannelExtendedData(ChannelExtendedData)
ChannelEof(ChannelEof)
ChannelClose(ChannelClose)
ChannelRequest(ChannelRequest)
ChannelSuccess(ChannelSuccess)
ChannelFailure(ChannelFailure)
Unknown(u8)
A message number this crate has no decoder for; its body is not read.
Implementations§
Source§impl Message
impl Message
Sourcepub fn encode_into(&self, out: &mut Vec<u8>)
pub fn encode_into(&self, out: &mut Vec<u8>)
Appends the payload to out.
Sourcepub fn decode(payload: &[u8]) -> Result<Message, DecodeError>
pub fn decode(payload: &[u8]) -> Result<Message, DecodeError>
Decodes a whole payload. Every field must be present and no byte may be left over,
except for Message::Unknown, whose body is not read.
Trait Implementations§
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Forget for Message
impl Freeze for Message
impl Move for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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