pub struct Compact<'a> {
pub signature: u16,
pub crc: u16,
pub data: &'a [u8],
/* private fields */
}Expand description
A compact frame’s application data.
Fields§
§signature: u16The format signature: which layout the data follows.
crc: u16CRC-16/EN-13757 of the full records this frame stands for.
data: &'a [u8]The data bytes of every record, concatenated.
Implementations§
Source§impl Compact<'_>
impl Compact<'_>
Sourcepub fn expand<'o, F: Formats + ?Sized>(
&self,
formats: &F,
out: &'o mut [u8],
) -> Result<Records<'o>>
pub fn expand<'o, F: Formats + ?Sized>( &self, formats: &F, out: &'o mut [u8], ) -> Result<Records<'o>>
Rebuild the full records into out with the layout from formats, and verify the
full-frame CRC. Error::UnknownFormat when the layout is not known yet (wait for
a full frame); Check::FullFrameCrc when the rebuilt records do not match.
Trait Implementations§
impl<'a> Copy for Compact<'a>
impl<'a> Eq for Compact<'a>
impl<'a> StructuralPartialEq for Compact<'a>
Auto Trait Implementations§
impl<'a> Forget for Compact<'a>
impl<'a> Freeze for Compact<'a>
impl<'a> Move for Compact<'a>
impl<'a> RefUnwindSafe for Compact<'a>
impl<'a> Send for Compact<'a>
impl<'a> Sync for Compact<'a>
impl<'a> Unpin for Compact<'a>
impl<'a> UnsafeUnpin for Compact<'a>where
&'a [u8]: UnsafeUnpin,
impl<'a> UnwindSafe for Compact<'a>where
&'a [u8]: UnwindSafe,
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