pub struct TlvOwned { /* private fields */ }Available on crate feature
alloc only.Expand description
Implementations§
Source§impl TlvOwned
impl TlvOwned
Sourcepub fn new_with_custom_type(tlv_type: u8, data: &[u8]) -> Self
pub fn new_with_custom_type(tlv_type: u8, data: &[u8]) -> Self
Generic constructor with a custom TLV type.
Sourcepub fn write_to_bytes(
&self,
buf: &mut [u8],
) -> Result<usize, ByteConversionError>
pub fn write_to_bytes( &self, buf: &mut [u8], ) -> Result<usize, ByteConversionError>
Write to a byte slice.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlvOwned
impl<'de> Deserialize<'de> for TlvOwned
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl GenericTlv for TlvOwned
impl GenericTlv for TlvOwned
Source§fn tlv_type_field(&self) -> TlvTypeField
fn tlv_type_field(&self) -> TlvTypeField
TLV type field.
Source§fn is_standard_tlv(&self) -> bool
fn is_standard_tlv(&self) -> bool
Checks whether the type field contains one of the standard types specified in the CFDP
standard and is part of the TlvType enum.
Source§impl ReadableTlv for TlvOwned
impl ReadableTlv for TlvOwned
Source§fn len_value(&self) -> usize
fn len_value(&self) -> usize
Helper method to retrieve the length of the value. Simply calls the slice::len method of
Self::value
Source§impl WritableTlv for TlvOwned
impl WritableTlv for TlvOwned
Source§fn write_to_bytes(&self, buf: &mut [u8]) -> Result<usize, ByteConversionError>
fn write_to_bytes(&self, buf: &mut [u8]) -> Result<usize, ByteConversionError>
Write the TLV to bytes.
Source§fn len_written(&self) -> usize
fn len_written(&self) -> usize
Length of the written TLV.
impl Eq for TlvOwned
impl StructuralPartialEq for TlvOwned
Auto Trait Implementations§
impl Freeze for TlvOwned
impl RefUnwindSafe for TlvOwned
impl Send for TlvOwned
impl Sync for TlvOwned
impl Unpin for TlvOwned
impl UnwindSafe for TlvOwned
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