Trait lorawan::parser::DataHeader
source · pub trait DataHeader {
// Required method
fn as_data_bytes(&self) -> &[u8] ⓘ;
// Provided methods
fn fhdr(&self) -> FHDR<'_> { ... }
fn is_confirmed(&self) -> bool { ... }
fn is_uplink(&self) -> bool { ... }
fn f_port(&self) -> Option<u8> { ... }
fn fhdr_length(&self) -> usize { ... }
}
Expand description
Helper trait for EncryptedDataPayload and DecryptedDataPayload.
NOTE: Does not check the payload size as that should be done prior to building the object of the implementing type.
Required Methods§
sourcefn as_data_bytes(&self) -> &[u8] ⓘ
fn as_data_bytes(&self) -> &[u8] ⓘ
Equivalent to AsRef<u8>.
Provided Methods§
sourcefn is_confirmed(&self) -> bool
fn is_confirmed(&self) -> bool
Gives whether the frame is confirmed
sourcefn fhdr_length(&self) -> usize
fn fhdr_length(&self) -> usize
Gives the length of the FHDR field.