pub struct WifiFrame<'a> { /* private fields */ }Expand description
Borrowed view of an OpenIPC/WFB 802.11 data frame.
Implementations§
Source§impl<'a> WifiFrame<'a>
impl<'a> WifiFrame<'a>
Sourcepub fn parse(data: &'a [u8], layout: FrameLayout) -> Result<Self, FrameError>
pub fn parse(data: &'a [u8], layout: FrameLayout) -> Result<Self, FrameError>
Parse and validate a borrowed 802.11 frame.
Sourcepub const fn layout(&self) -> FrameLayout
pub const fn layout(&self) -> FrameLayout
Return the frame layout used during parsing.
Sourcepub fn payload(&self) -> &'a [u8] ⓘ
pub fn payload(&self) -> &'a [u8] ⓘ
Return the WFB forwarder payload without the 802.11 header or FCS.
Sourcepub fn nonce(&self) -> [u8; 8]
pub fn nonce(&self) -> [u8; 8]
Build the 8-byte nonce input mirrored from the WFB address fields.
Sourcepub fn matches_channel_id(&self, channel_id: ChannelId) -> bool
pub fn matches_channel_id(&self, channel_id: ChannelId) -> bool
Return true when both mirrored address fields match channel_id.
Sourcepub fn channel_id(&self) -> Option<ChannelId>
pub fn channel_id(&self) -> Option<ChannelId>
Extract the mirrored channel id when the WFB address fields agree.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WifiFrame<'a>
impl<'a> RefUnwindSafe for WifiFrame<'a>
impl<'a> Send for WifiFrame<'a>
impl<'a> Sync for WifiFrame<'a>
impl<'a> Unpin for WifiFrame<'a>
impl<'a> UnsafeUnpin for WifiFrame<'a>
impl<'a> UnwindSafe for WifiFrame<'a>
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