pub(crate) enum ResponseFrame<'a> {
Payload(&'a [u8]),
Status(u8),
}Expand description
A parsed and CRC-verified response frame.
Borrows from the receive buffer. The lifetime ties the parsed structure to the buffer so the caller cannot reuse it while still reading the payload.
Variants§
Payload(&'a [u8])
Standard payload response. The slice contains the bytes between the count byte and the CRC.
Status(u8)
4-byte status response. The chip reports a one-byte status code that
is non-zero. Callers should pass this byte to
crate::error::ChipError::from_status_byte.
Trait Implementations§
Source§impl<'a> Debug for ResponseFrame<'a>
impl<'a> Debug for ResponseFrame<'a>
Source§impl<'a> PartialEq for ResponseFrame<'a>
impl<'a> PartialEq for ResponseFrame<'a>
impl<'a> Eq for ResponseFrame<'a>
impl<'a> StructuralPartialEq for ResponseFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for ResponseFrame<'a>
impl<'a> RefUnwindSafe for ResponseFrame<'a>
impl<'a> Send for ResponseFrame<'a>
impl<'a> Sync for ResponseFrame<'a>
impl<'a> Unpin for ResponseFrame<'a>
impl<'a> UnsafeUnpin for ResponseFrame<'a>
impl<'a> UnwindSafe for ResponseFrame<'a>
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