Struct simple_tlv::Tag[][src]

pub struct Tag(_);

The tag field consists of a single byte encoding a tag number from 1 to 254. The values '00' and 'FF' are invalid.

Implementations

impl Tag[src]

pub fn assert_eq(self, expected: Tag) -> Result<Tag>[src]

Assert that this Tag matches the provided expected tag.

On mismatch, returns an Error with ErrorKind::UnexpectedTag.

pub fn with_value<V>(self, value: V) -> TaggedValue<V>[src]

Trait Implementations

impl Clone for Tag[src]

impl Copy for Tag[src]

impl Debug for Tag[src]

impl Decodable<'_> for Tag[src]

impl Display for Tag[src]

impl Encodable for Tag[src]

impl Eq for Tag[src]

impl PartialEq<Tag> for Tag[src]

impl StructuralEq for Tag[src]

impl StructuralPartialEq for Tag[src]

impl TryFrom<u8> for Tag[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl Send for Tag[src]

impl Sync for Tag[src]

impl Unpin for Tag[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.