Struct capsules_extra::ieee802154::framer::Frame
source · pub struct Frame { /* private fields */ }
Expand description
A Frame
wraps a static mutable byte slice and keeps just enough
information about its header contents to expose a restricted interface for
modifying its payload. This enables the user to abdicate any concerns about
where the payload should be placed in the buffer.
Implementations§
source§impl Frame
impl Frame
sourcepub fn into_buf(self) -> &'static mut [u8]
pub fn into_buf(self) -> &'static mut [u8]
Consumes the frame and retrieves the buffer it wraps
sourcepub fn remaining_data_capacity(&self) -> usize
pub fn remaining_data_capacity(&self) -> usize
Calculates how much more data this frame can hold
sourcepub fn append_payload(&mut self, payload: &[u8]) -> Result<(), ErrorCode>
pub fn append_payload(&mut self, payload: &[u8]) -> Result<(), ErrorCode>
Appends payload bytes into the frame if possible
sourcepub fn append_payload_process(
&mut self,
payload_buf: &ReadableProcessSlice,
) -> Result<(), ErrorCode>
pub fn append_payload_process( &mut self, payload_buf: &ReadableProcessSlice, ) -> Result<(), ErrorCode>
Appends payload bytes from a process slice into the frame if possible
Trait Implementations§
source§impl PartialEq for Frame
impl PartialEq for Frame
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl !UnwindSafe for Frame
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