pub struct Tlv8Reader;Expand description
Stateless TLV8 decoder entry point.
Implementations§
Source§impl Tlv8Reader
impl Tlv8Reader
Sourcepub fn parse(bytes: &[u8]) -> Result<Vec<(u8, Vec<u8>)>>
pub fn parse(bytes: &[u8]) -> Result<Vec<(u8, Vec<u8>)>>
Parse a TLV8 byte stream into reassembled (type, value) items.
Consecutive items of the same type are concatenated into one logical
value while the run stays open (each fragment exactly 255 bytes means
more follows); a sub-255 fragment closes the run. The
crate::SEPARATOR (0xFF) item is kept as its own (0xFF, vec![])
entry and never reassembled.
§Errors
Returns Tlv8Error::UnexpectedEof if an item declares a length that
runs past the end of the input.
Auto Trait Implementations§
impl Freeze for Tlv8Reader
impl RefUnwindSafe for Tlv8Reader
impl Send for Tlv8Reader
impl Sync for Tlv8Reader
impl Unpin for Tlv8Reader
impl UnsafeUnpin for Tlv8Reader
impl UnwindSafe for Tlv8Reader
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