pub struct DataFrameHeader {
pub frame_type: FrameType,
pub flags: FrameFlags,
pub session_id: SessionId,
pub nonce_counter: u64,
}Available on crate feature
transport only.Expand description
Data frame header (unencrypted portion, used as AAD).
Wire format (16 bytes):
+--------+--------+------------------+--------------------+
| Type | Flags | Session ID | Nonce Counter |
| 1 byte | 1 byte | 6 bytes | 8 bytes (LE64) |
+--------+--------+------------------+--------------------+Fields§
§frame_type: FrameTypeFrame type (should be Data or Close).
flags: FrameFlagsFrame flags.
session_id: SessionIdSession identifier.
nonce_counter: u64Nonce counter (per-direction, monotonically increasing).
Implementations§
Source§impl DataFrameHeader
impl DataFrameHeader
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, FrameError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, FrameError>
Parse header from bytes.
Trait Implementations§
Source§impl Clone for DataFrameHeader
impl Clone for DataFrameHeader
Source§fn clone(&self) -> DataFrameHeader
fn clone(&self) -> DataFrameHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataFrameHeader
impl Debug for DataFrameHeader
Source§impl PartialEq for DataFrameHeader
impl PartialEq for DataFrameHeader
impl Copy for DataFrameHeader
impl Eq for DataFrameHeader
impl StructuralPartialEq for DataFrameHeader
Auto Trait Implementations§
impl Freeze for DataFrameHeader
impl RefUnwindSafe for DataFrameHeader
impl Send for DataFrameHeader
impl Sync for DataFrameHeader
impl Unpin for DataFrameHeader
impl UnwindSafe for DataFrameHeader
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