Enum der::Tag [−][src]
#[non_exhaustive]
#[repr(u8)]
pub enum Tag {
Show variants
Boolean,
Integer,
BitString,
OctetString,
Null,
ObjectIdentifier,
Utf8String,
Set,
PrintableString,
Ia5String,
UtcTime,
GeneralizedTime,
Sequence,
ContextSpecific0,
ContextSpecific1,
ContextSpecific2,
ContextSpecific3,
}Expand description
ASN.1 tags.
Tags are the leading byte of the Tag-Length-Value encoding used by ASN.1 DER and identify the type of the subsequent value.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Expand description
BOOLEAN tag.
Expand description
INTEGER tag.
Expand description
BIT STRING tag.
Expand description
OCTET STRING tag.
Expand description
NULL tag.
Expand description
OBJECT IDENTIFIER tag.
Expand description
UTF8String tag.
Expand description
SET and SET OF tag.
Expand description
PrintableString tag.
Expand description
IA5String tag.
Expand description
UTCTime tag.
Expand description
GeneralizedTime tag.
Expand description
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.
Expand description
Context-specific tag (0) unique to a particular structure.
Expand description
Context-specific tag (1) unique to a particular structure.
Expand description
Context-specific tag (2) unique to a particular structure.
Expand description
Context-specific tag (3) unique to a particular structure.
Implementations
Trait Implementations
impl Encodable for Tag[src]
impl Encodable for Tag[src]fn encoded_len(&self) -> Result<Length>[src]
fn encoded_len(&self) -> Result<Length>[src]Compute the length of this value in bytes when encoded as ASN.1 DER.
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>[src]Encode this value as ASN.1 DER using the provided Encoder.
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>[src]
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>[src]Encode this value to the provided byte slice, returning a sub-slice containing the encoded message. Read more
impl Ord for Tag[src]
impl Ord for Tag[src]impl PartialOrd<Tag> for Tag[src]
impl PartialOrd<Tag> for Tag[src]fn partial_cmp(&self, other: &Tag) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Tag) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for Tag[src]
impl Eq for Tag[src]
impl StructuralEq for Tag[src]
impl StructuralPartialEq for Tag[src]
Auto Trait Implementations
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more