pub struct PvdDecoder { /* private fields */ }Expand description
PVD Decoder state
Implementations§
Source§impl PvdDecoder
impl PvdDecoder
pub fn new(is_be: bool) -> Self
Sourcepub fn decode_size(&self, data: &[u8]) -> Option<(usize, usize)>
pub fn decode_size(&self, data: &[u8]) -> Option<(usize, usize)>
Decode a size value (PVA variable-length encoding)
Sourcepub fn parse_field_desc(&self, data: &[u8]) -> Option<(FieldDesc, usize)>
pub fn parse_field_desc(&self, data: &[u8]) -> Option<(FieldDesc, usize)>
Parse field description from introspection data
Sourcepub fn parse_introspection(&self, data: &[u8]) -> Option<StructureDesc>
pub fn parse_introspection(&self, data: &[u8]) -> Option<StructureDesc>
Parse the full type introspection from INIT response
Sourcepub fn parse_introspection_with_len(
&self,
data: &[u8],
) -> Option<(StructureDesc, usize)>
pub fn parse_introspection_with_len( &self, data: &[u8], ) -> Option<(StructureDesc, usize)>
Parse full type introspection and return consumed bytes.
Sourcepub fn decode_value(
&self,
data: &[u8],
field_type: &FieldType,
) -> Option<(DecodedValue, usize)>
pub fn decode_value( &self, data: &[u8], field_type: &FieldType, ) -> Option<(DecodedValue, usize)>
Decode value according to field type
Sourcepub fn decode_structure(
&self,
data: &[u8],
desc: &StructureDesc,
) -> Option<(DecodedValue, usize)>
pub fn decode_structure( &self, data: &[u8], desc: &StructureDesc, ) -> Option<(DecodedValue, usize)>
Decode a structure value using the field descriptions
Sourcepub fn decode_structure_with_bitset(
&self,
data: &[u8],
desc: &StructureDesc,
) -> Option<(DecodedValue, usize)>
pub fn decode_structure_with_bitset( &self, data: &[u8], desc: &StructureDesc, ) -> Option<(DecodedValue, usize)>
Decode a structure with a bitset indicating which fields are present This is used for delta updates in MONITOR
Sourcepub fn decode_structure_with_bitset_and_overrun(
&self,
data: &[u8],
desc: &StructureDesc,
) -> Option<(DecodedValue, usize)>
pub fn decode_structure_with_bitset_and_overrun( &self, data: &[u8], desc: &StructureDesc, ) -> Option<(DecodedValue, usize)>
Decode a structure with changed and overrun bitsets (MONITOR updates)
Sourcepub fn decode_structure_with_bitset_then_overrun(
&self,
data: &[u8],
desc: &StructureDesc,
) -> Option<(DecodedValue, usize)>
pub fn decode_structure_with_bitset_then_overrun( &self, data: &[u8], desc: &StructureDesc, ) -> Option<(DecodedValue, usize)>
Decode a structure with changed bitset, data, then overrun bitset (spec order)
Auto Trait Implementations§
impl Freeze for PvdDecoder
impl RefUnwindSafe for PvdDecoder
impl Send for PvdDecoder
impl Sync for PvdDecoder
impl Unpin for PvdDecoder
impl UnsafeUnpin for PvdDecoder
impl UnwindSafe for PvdDecoder
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