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§

source

fn as_data_bytes(&self) -> &[u8]

Equivalent to AsRef<u8>.

Provided Methods§

source

fn fhdr(&self) -> FHDR<'_>

Gives the FHDR of the DataPayload.

source

fn is_confirmed(&self) -> bool

Gives whether the frame is confirmed

Gives whether the payload is uplink or not.

source

fn f_port(&self) -> Option<u8>

Gives the FPort of the DataPayload if there is one.

source

fn fhdr_length(&self) -> usize

Gives the length of the FHDR field.

Implementors§