Enum der::Tag[][src]

#[non_exhaustive]
#[repr(u8)]pub enum Tag {
    Boolean,
    Integer,
    BitString,
    OctetString,
    Null,
    ObjectIdentifier,
    Utf8String,
    PrintableString,
    UtcTime,
    GeneralizedTime,
    Sequence,
    ContextSpecific0,
    ContextSpecific1,
    ContextSpecific2,
    ContextSpecific3,
}

ASN.1 tags.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Boolean

BOOLEAN tag.

Integer

INTEGER tag.

BitString

BIT STRING tag.

OctetString

OCTET STRING tag.

Null

NULL tag.

ObjectIdentifier

OBJECT IDENTIFIER tag.

Utf8String

UTF8String tag.

PrintableString

PrintableString tag.

UtcTime

UTCTime tag.

GeneralizedTime

GeneralizedTime tag.

Sequence

SEQUENCE tag.

Note that the universal tag number for SEQUENCE is technically 0x10 however we presently only support the constructed form, which has the 6th bit (i.e. 0x20) set.

ContextSpecific0

Context-specific tag (0) unique to a particular structure.

ContextSpecific1

Context-specific tag (1) unique to a particular structure.

ContextSpecific2

Context-specific tag (2) unique to a particular structure.

ContextSpecific3

Context-specific tag (3) unique to a particular structure.

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 type_name(self) -> &'static str[src]

Names of ASN.1 type which corresponds to a given Tag.

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

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> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.