Struct simple_tlv::TaggedValue[][src]

pub struct TaggedValue<V> { /* fields omitted */ }

SIMPLE-TLV data object.

Implementations

impl<V> TaggedValue<V>[src]

pub fn new(tag: Tag, value: V) -> Self[src]

pub fn tag(&self) -> Tag[src]

impl<'a> TaggedValue<Slice<'a>>[src]

pub fn from(tag: Tag, slice: &'a [u8]) -> Result<Self>[src]

Create a new tagged slice, checking lengths.

pub fn as_bytes(&self) -> &'a [u8][src]

Borrow the inner byte slice.

pub fn length(&self) -> Length[src]

Get the length of the inner byte slice.

pub fn is_empty(&self) -> bool[src]

Is the inner byte slice empty?

pub fn decode_nested<F, T>(&self, f: F) -> Result<T> where
    F: FnOnce(&mut Decoder<'a>) -> Result<T>, 
[src]

Decode nested values, creating a new Decoder for the data contained in the sequence's body and passing it to the provided FnOnce.

Trait Implementations

impl<V: Clone> Clone for TaggedValue<V>[src]

impl<V: Copy> Copy for TaggedValue<V>[src]

impl<V: Debug> Debug for TaggedValue<V>[src]

impl<'a, E> Encodable for TaggedValue<&'a E> where
    E: Encodable
[src]

impl<V: Eq> Eq for TaggedValue<V>[src]

impl<V: PartialEq> PartialEq<TaggedValue<V>> for TaggedValue<V>[src]

impl<V> StructuralEq for TaggedValue<V>[src]

impl<V> StructuralPartialEq for TaggedValue<V>[src]

Auto Trait Implementations

impl<V> Send for TaggedValue<V> where
    V: Send
[src]

impl<V> Sync for TaggedValue<V> where
    V: Sync
[src]

impl<V> Unpin for TaggedValue<V> where
    V: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.