pub struct Message {
pub channel: u32,
pub command: Command,
pub sequence: u8,
pub payload_len: usize,
pub payload: Vec<u8>,
}
Expand description
A complete CTAP2 message, which is built from one or many packets.
The initial packet is an InitPacket
then multiple ContPacket
are used to populate a large
payload which is larger than the maximum packet size.
Fields§
§channel: u32
Channel Identifier. This is 4 bytes, but the endianness is not defined by the spec hence we will simply use the native endianness since its actual value is just important on the wire.
command: Command
Command identifier. This comes from the InitPacket
.
sequence: u8
Total number of continuation packets used to create this message. Used for internal state.
payload_len: usize
Total Payload length. This is represented as a Big Endian u16 on the wire.
payload: Vec<u8>
Payload bytes.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin 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