pub struct FrameHeader {
pub frame_type: FrameType,
pub version: u8,
pub compressed: bool,
pub fragmented: bool,
pub payload_length: u32,
}Expand description
Frame header structure
Layout (8 bytes):
- Byte 0: Frame type (4 bits) | Protocol version (4 bits)
- Byte 1: Flags (compressed: 1 bit, fragmented: 1 bit, reserved: 6 bits)
- Bytes 2-5: Payload length (u32, big-endian)
- Bytes 6-7: Reserved
Fields§
§frame_type: FrameTypeFrame type
version: u8Protocol version
compressed: boolCompressed flag
fragmented: boolFragmented flag
payload_length: u32Payload length
Implementations§
Trait Implementations§
Source§impl Clone for FrameHeader
impl Clone for FrameHeader
Source§fn clone(&self) -> FrameHeader
fn clone(&self) -> FrameHeader
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 moreAuto Trait Implementations§
impl Freeze for FrameHeader
impl RefUnwindSafe for FrameHeader
impl Send for FrameHeader
impl Sync for FrameHeader
impl Unpin for FrameHeader
impl UnsafeUnpin for FrameHeader
impl UnwindSafe for FrameHeader
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