pub struct Frame<'a> {
pub header: Header,
pub cmd: u8,
pub payload: &'a [u8],
}Expand description
A parsed frame borrowing its payload from the input.
cmd is kept as the raw identifier so receivers can distinguish an
unknown-but-well-formed command (respond with
STATUS_INVALID_COMMAND) from a malformed frame (ignore).
Fields§
§header: Header§cmd: u8§payload: &'a [u8]Implementations§
Trait Implementations§
impl<'a> Copy for Frame<'a>
impl<'a> Eq for Frame<'a>
impl<'a> StructuralPartialEq for Frame<'a>
Auto Trait Implementations§
impl<'a> Freeze for Frame<'a>
impl<'a> RefUnwindSafe for Frame<'a>
impl<'a> Send for Frame<'a>
impl<'a> Sync for Frame<'a>
impl<'a> Unpin for Frame<'a>
impl<'a> UnwindSafe for Frame<'a>
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)