pub struct TlvStateOwned { /* private fields */ }
Expand description
Encapsulates owned TLV data
Implementations§
Source§impl TlvStateOwned
impl TlvStateOwned
Trait Implementations§
Source§impl Debug for TlvStateOwned
impl Debug for TlvStateOwned
Source§impl PartialEq for TlvStateOwned
impl PartialEq for TlvStateOwned
Source§impl TlvState for TlvStateOwned
impl TlvState for TlvStateOwned
Source§fn get_value_with_repetition<V: SplDiscriminate + Pod>(
&self,
repetition_number: usize,
) -> Result<&V, ProgramError>
fn get_value_with_repetition<V: SplDiscriminate + Pod>( &self, repetition_number: usize, ) -> Result<&V, ProgramError>
Unpack a portion of the TLV data as the desired Pod type for the entry
number specified
Source§fn get_first_value<V: SplDiscriminate + Pod>(&self) -> Result<&V, ProgramError>
fn get_first_value<V: SplDiscriminate + Pod>(&self) -> Result<&V, ProgramError>
Unpack a portion of the TLV data as the desired Pod type for the first
entry found
Source§fn get_variable_len_value_with_repetition<V: SplDiscriminate + VariableLenPack>(
&self,
repetition_number: usize,
) -> Result<V, ProgramError>
fn get_variable_len_value_with_repetition<V: SplDiscriminate + VariableLenPack>( &self, repetition_number: usize, ) -> Result<V, ProgramError>
Unpacks a portion of the TLV data as the desired variable-length type
for the entry number specified
Source§fn get_first_variable_len_value<V: SplDiscriminate + VariableLenPack>(
&self,
) -> Result<V, ProgramError>
fn get_first_variable_len_value<V: SplDiscriminate + VariableLenPack>( &self, ) -> Result<V, ProgramError>
Unpacks a portion of the TLV data as the desired variable-length type
for the first entry found
Source§fn get_bytes_with_repetition<V: SplDiscriminate>(
&self,
repetition_number: usize,
) -> Result<&[u8], ProgramError>
fn get_bytes_with_repetition<V: SplDiscriminate>( &self, repetition_number: usize, ) -> Result<&[u8], ProgramError>
Unpack a portion of the TLV data as bytes for the entry number specified
Source§fn get_first_bytes<V: SplDiscriminate>(&self) -> Result<&[u8], ProgramError>
fn get_first_bytes<V: SplDiscriminate>(&self) -> Result<&[u8], ProgramError>
Unpack a portion of the TLV data as bytes for the first entry found
Source§fn get_discriminators(&self) -> Result<Vec<ArrayDiscriminator>, ProgramError>
fn get_discriminators(&self) -> Result<Vec<ArrayDiscriminator>, ProgramError>
Iterates through the TLV entries, returning only the types
Source§fn get_base_len() -> usize
fn get_base_len() -> usize
Get the base size required for TLV data
impl StructuralPartialEq for TlvStateOwned
Auto Trait Implementations§
impl Freeze for TlvStateOwned
impl RefUnwindSafe for TlvStateOwned
impl Send for TlvStateOwned
impl Sync for TlvStateOwned
impl Unpin for TlvStateOwned
impl UnwindSafe for TlvStateOwned
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more