Enum ethers::core::k256::elliptic_curve::pkcs8::der::Tag [−][src]
#[non_exhaustive]
pub enum Tag {
}
Expand description
ASN.1 tags.
Tags are the leading identifier octet of the Tag-Length-Value encoding used by ASN.1 DER and identify the type of the subsequent value.
They are described in X.690 Section 8.1.2: Identifier octets, and structured as follows:
| Class | P/C | Tag Number |
- Bits 8/7:
Class
- Bit 6: primitive (0) or constructed (1)
- Bits 5-1: tag number
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Boolean
BOOLEAN
tag: 0x01
Integer
INTEGER
tag: 0x02
BitString
BIT STRING
tag: 0x03
OctetString
OCTET STRING
tag: 0x04
Null
NULL
tag: 0x05
ObjectIdentifier
OBJECT IDENTIFIER
tag: 0x06
Utf8String
UTF8String
tag: 0x0C
Sequence
SEQUENCE
tag: 0x10
Set
SET
and SET OF
tag: 0x11
PrintableString
PrintableString
tag: 0x13
Ia5String
IA5String
tag: 0x16
UtcTime
UTCTime
tag: 0x17
GeneralizedTime
GeneralizedTime
tag: 0x18
Application(TagNumber)
Tuple Fields
0: TagNumber
Application tag.
ContextSpecific(TagNumber)
Tuple Fields
0: TagNumber
Context-specific tag.
Private(TagNumber)
Tuple Fields
0: TagNumber
Private tag number.
Implementations
Assert that this Tag
matches the provided expected tag.
On mismatch, returns an Error
with ErrorKind::UnexpectedTag
.
Create an Error
for an non-canonical value with the ASN.1 type
identified by this tag.
Create an Error
because the current tag was unexpected, with an
optional expected tag.
Create an Error
for an invalid value with the ASN.1 type identified
by this tag.
Trait Implementations
Compute the length of this value in bytes when encoded as ASN.1 DER.
Encode this value as ASN.1 DER using the provided Encoder
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Tag
impl UnwindSafe for Tag
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more