Struct canadensis_header::RawHeader
source · #[repr(C)]pub struct RawHeader { /* private fields */ }
Expand description
A header, with memory layout matching the on-wire representation
This post specifies the header format.
Implementations§
source§impl RawHeader
impl RawHeader
sourcepub fn is_last_frame(&self) -> bool
pub fn is_last_frame(&self) -> bool
Returns true if this is the last frame in a transfer
sourcepub fn frame_index(&self) -> u32
pub fn frame_index(&self) -> u32
Returns the index of this frame in a transfer
sourcepub fn checksum_valid(&self) -> bool
pub fn checksum_valid(&self) -> bool
Returns true if this header’s checksum is correct
Trait Implementations§
source§impl AsBytes for RawHeader
impl AsBytes for RawHeader
source§fn as_bytes_mut(&mut self) -> &mut [u8]where
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8]where Self: FromBytes,
Gets the bytes of this value mutably. Read more
source§fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§impl FromBytes for RawHeader
impl FromBytes for RawHeader
source§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere Self: Sized,
Creates an instance of
Self
from zeroed bytes.