pub struct Packet {
pub packet_version: String<8>,
pub packet_id: String<STRING_CAP>,
pub source: String<STRING_CAP>,
pub destination: String<STRING_CAP>,
pub priority: String<8>,
pub emergency: bool,
pub created_at: String<STRING_CAP>,
pub expires_at: Option<String<STRING_CAP>>,
pub signer: String<STRING_CAP>,
pub algorithm: String<16>,
pub payload: Vec<u8, PAYLOAD_CAP>,
pub signature: Vec<u8, SIGNATURE_CAP>,
}Expand description
A no_std packet header. Mirrors the field set of the std Packet
struct in tf-types::packet minus features (fragmentation, route
constraints) that K1 does not implement. K1 carries the data
fields that the receiver MUST verify against the signature.
Fields§
§packet_version: String<8>§packet_id: String<STRING_CAP>§source: String<STRING_CAP>§destination: String<STRING_CAP>§priority: String<8>§emergency: bool§created_at: String<STRING_CAP>§expires_at: Option<String<STRING_CAP>>§signer: String<STRING_CAP>§algorithm: String<16>§payload: Vec<u8, PAYLOAD_CAP>§signature: Vec<u8, SIGNATURE_CAP>Trait Implementations§
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnsafeUnpin for Packet
impl UnwindSafe for Packet
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