Struct spl_type_length_value::state::TlvStateOwned
source · 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<TlvStateOwned> for TlvStateOwned
impl PartialEq<TlvStateOwned> for TlvStateOwned
source§fn eq(&self, other: &TlvStateOwned) -> bool
fn eq(&self, other: &TlvStateOwned) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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 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