pub enum Command {
Show 14 variants
NonceGet(NonceGet),
NonceReport(NonceReport),
MessageEncapsulation(MessageEncapsulation),
KexGet(KexGet),
KexReport(KexReport),
KexSet(KexSet),
KexFail(KexFail),
PublicKeyReport(PublicKeyReport),
NetworkKeyGet(NetworkKeyGet),
NetworkKeyReport(NetworkKeyReport),
NetworkKeyVerify(NetworkKeyVerify),
TransferEnd(TransferEnd),
CommandsSupportedGet(CommandsSupportedGet),
CommandsSupportedReport(CommandsSupportedReport),
}Expand description
Every Security 2 command.
Variants§
NonceGet(NonceGet)
Nonce Get.
NonceReport(NonceReport)
Nonce Report.
MessageEncapsulation(MessageEncapsulation)
Message Encapsulation.
KexGet(KexGet)
Kex Get.
KexReport(KexReport)
Kex Report.
KexSet(KexSet)
Kex Set.
KexFail(KexFail)
Kex Fail.
PublicKeyReport(PublicKeyReport)
Public Key Report.
NetworkKeyGet(NetworkKeyGet)
Network Key Get.
NetworkKeyReport(NetworkKeyReport)
Network Key Report.
NetworkKeyVerify(NetworkKeyVerify)
Network Key Verify.
TransferEnd(TransferEnd)
Transfer End.
CommandsSupportedGet(CommandsSupportedGet)
Commands Supported Get.
CommandsSupportedReport(CommandsSupportedReport)
Commands Supported Report.
Implementations§
Source§impl Command
impl Command
Sourcepub fn parse(command: u8, payload: &[u8]) -> Result<Option<Self>, ParseError>
pub fn parse(command: u8, payload: &[u8]) -> Result<Option<Self>, ParseError>
Parses a command of this class; Ok(None) for an unknown command id.
Sourcepub fn command_id(&self) -> u8
pub fn command_id(&self) -> u8
The command id.
Sourcepub fn encode_payload(&self, w: &mut Vec<u8>)
pub fn encode_payload(&self, w: &mut Vec<u8>)
Appends the payload after the command id.
Trait Implementations§
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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