pub struct Frame { /* private fields */ }
Expand description
Wraps a static mutable byte slice along with header information for a 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§
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