pub struct PacketHeader {
pub fcf: Fcf,
pub options_range: Range<usize>,
pub flood_hops: Option<FloodHops>,
pub dst: Option<NodeHint>,
pub channel: Option<ChannelId>,
pub ack_dst: Option<NodeHint>,
pub source: SourceAddrRef,
pub sec_info: Option<SecInfo>,
pub body_range: Range<usize>,
pub mic_range: Range<usize>,
pub total_len: usize,
}Expand description
Parsed packet header with borrowed ranges into the original frame.
Fields§
§fcf: Fcf§options_range: Range<usize>§flood_hops: Option<FloodHops>§dst: Option<NodeHint>§channel: Option<ChannelId>§ack_dst: Option<NodeHint>§source: SourceAddrRef§sec_info: Option<SecInfo>§body_range: Range<usize>§mic_range: Range<usize>§total_len: usizeImplementations§
Source§impl PacketHeader
impl PacketHeader
Sourcepub fn parse(buf: &[u8]) -> Result<Self, ParseError>
pub fn parse(buf: &[u8]) -> Result<Self, ParseError>
Parse a complete on-wire packet header and compute payload/MIC ranges.
Sourcepub fn packet_type(&self) -> PacketType
pub fn packet_type(&self) -> PacketType
Convenience accessor for the decoded packet type.
Sourcepub fn ack_requested(&self) -> bool
pub fn ack_requested(&self) -> bool
Return whether the packet requests a MAC ACK.
Trait Implementations§
Source§impl Clone for PacketHeader
impl Clone for PacketHeader
Source§fn clone(&self) -> PacketHeader
fn clone(&self) -> PacketHeader
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PacketHeader
impl Debug for PacketHeader
Source§impl PartialEq for PacketHeader
impl PartialEq for PacketHeader
impl Eq for PacketHeader
impl StructuralPartialEq for PacketHeader
Auto Trait Implementations§
impl Freeze for PacketHeader
impl RefUnwindSafe for PacketHeader
impl Send for PacketHeader
impl Sync for PacketHeader
impl Unpin for PacketHeader
impl UnwindSafe for PacketHeader
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)