Type Definition simple_tlv::TaggedSlice[][src]

type TaggedSlice<'a> = TaggedValue<Slice<'a>>;

Raw SIMPLE-TLV data object TaggedValue<Slice<'_>>.

Implementations

impl<'a> TaggedSlice<'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<'a> Decodable<'a> for TaggedSlice<'a>[src]

impl<'a> Encodable for TaggedSlice<'a>[src]