pub struct Any<'a> { /* private fields */ }
Expand description
ASN.1 ANY
: represents any explicitly tagged ASN.1 value.
Technically ANY
hasn’t been a recommended part of ASN.1 since the X.209
revision from 1988. It was deprecated and replaced by Information Object
Classes in X.680 in 1994, and X.690 no longer refers to it whatsoever.
Nevertheless, this crate defines an Any
type as it remains a familiar
and useful concept which is still extensively used in things like
PKI-related RFCs.
Any
representation of the ASN.1 NULL
type.
Create a new Any
from the provided Tag
and byte slice.
Get the raw value for this Any
type as a byte slice.
Attempt to decode this Any
type into the inner value.
Is this value an ASN.1 NULL
value?
Attempt to decode an ASN.1 BIT STRING
.
Attempt to decode an ASN.1 CONTEXT-SPECIFIC
field.
Attempt to decode an ASN.1 GeneralizedTime
.
Attempt to decode an ASN.1 IA5String
.
Attempt to decode an ASN.1 OCTET STRING
.
This is supported on crate feature oid
only.
Attempt to decode an ASN.1 OBJECT IDENTIFIER
.
Attempt to decode an ASN.1 OPTIONAL
value.
Attempt to decode an ASN.1 PrintableString
.
Attempt to decode this value an ASN.1 SEQUENCE
, creating a new
nested Decoder
and calling the provided argument with it.
Attempt to decode an ASN.1 UTCTime
.
Attempt to decode an ASN.1 UTF8String
.
Is the provided Tag
decodable as a variant of this CHOICE
?
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Attempt to decode this message using the provided decoder.
Parse Self
from the provided DER-encoded byte slice.
Compute the length of this value (sans Tag
+Length
header) when
encoded as ASN.1 DER. Read more
Get the Header
used to encode this value.
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Get the ASN.1 tag that this type is encoded with.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
This is supported on crate feature std
only.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
This is supported on crate feature alloc
only.
The type returned in the event of a conversion error.
Return an Ordering
between value portion of TLV-encoded self
and
other
when serialized as ASN.1 DER. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.