Struct der::Any [−][src]
pub struct Any<'a> { /* fields omitted */ }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.
Implementations
impl<'a> Any<'a>[src]
impl<'a> Any<'a>[src]pub fn bit_string(self) -> Result<BitString<'a>>[src]
pub fn bit_string(self) -> Result<BitString<'a>>[src]Attempt to decode an ASN.1 BIT STRING.
pub fn generalized_time(self) -> Result<GeneralizedTime>[src]
pub fn generalized_time(self) -> Result<GeneralizedTime>[src]Attempt to decode an ASN.1 GeneralizedTime.
pub fn ia5_string(self) -> Result<Ia5String<'a>>[src]
pub fn ia5_string(self) -> Result<Ia5String<'a>>[src]Attempt to decode an ASN.1 IA5String.
pub fn octet_string(self) -> Result<OctetString<'a>>[src]
pub fn octet_string(self) -> Result<OctetString<'a>>[src]Attempt to decode an ASN.1 OCTET STRING.
pub fn oid(self) -> Result<ObjectIdentifier>[src]
This is supported on crate feature oid only.
pub fn oid(self) -> Result<ObjectIdentifier>[src]oid only.Attempt to decode an ASN.1 OBJECT IDENTIFIER.
pub fn printable_string(self) -> Result<PrintableString<'a>>[src]
pub fn printable_string(self) -> Result<PrintableString<'a>>[src]Attempt to decode an ASN.1 PrintableString.
pub fn sequence<F, T>(self, f: F) -> Result<T> where
F: FnOnce(&mut Decoder<'a>) -> Result<T>, [src]
pub fn sequence<F, T>(self, f: F) -> Result<T> where
F: FnOnce(&mut Decoder<'a>) -> Result<T>, [src]Attempt to decode this value an ASN.1 SEQUENCE, creating a new
nested Decoder and calling the provided argument with it.
pub fn utf8_string(self) -> Result<Utf8String<'a>>[src]
pub fn utf8_string(self) -> Result<Utf8String<'a>>[src]Attempt to decode an ASN.1 UTF8String.
Trait Implementations
impl<'a> Choice<'a> for Any<'a>[src]
impl<'a> Choice<'a> for Any<'a>[src]fn can_decode(_: Tag) -> bool[src]
fn can_decode(_: Tag) -> bool[src]Is the provided Tag decodable as a variant of this CHOICE?
impl<'a> Encodable for Any<'a>[src]
impl<'a> Encodable for Any<'a>[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<'a> From<&'a ObjectIdentifier> for Any<'a>[src]
impl<'a> From<&'a ObjectIdentifier> for Any<'a>[src]fn from(oid: &'a ObjectIdentifier) -> Any<'a>[src]
fn from(oid: &'a ObjectIdentifier) -> Any<'a>[src]Performs the conversion.
impl<'a> From<OctetString<'a>> for Any<'a>[src]
impl<'a> From<OctetString<'a>> for Any<'a>[src]fn from(octet_string: OctetString<'a>) -> Any<'a>[src]
fn from(octet_string: OctetString<'a>) -> Any<'a>[src]Performs the conversion.
impl<'a> From<PrintableString<'a>> for Any<'a>[src]
impl<'a> From<PrintableString<'a>> for Any<'a>[src]fn from(printable_string: PrintableString<'a>) -> Any<'a>[src]
fn from(printable_string: PrintableString<'a>) -> Any<'a>[src]Performs the conversion.
impl<'a, T> From<SetOfRef<'a, T>> for Any<'a> where
T: Clone + Decodable<'a> + Encodable + Ord, [src]
impl<'a, T> From<SetOfRef<'a, T>> for Any<'a> where
T: Clone + Decodable<'a> + Encodable + Ord, [src]impl<'a> From<Utf8String<'a>> for Any<'a>[src]
impl<'a> From<Utf8String<'a>> for Any<'a>[src]fn from(utf8_string: Utf8String<'a>) -> Any<'a>[src]
fn from(utf8_string: Utf8String<'a>) -> Any<'a>[src]Performs the conversion.
impl<'a> Ord for Any<'a>[src]
impl<'a> Ord for Any<'a>[src]impl<'a> PartialOrd<Any<'a>> for Any<'a>[src]
impl<'a> PartialOrd<Any<'a>> for Any<'a>[src]fn partial_cmp(&self, other: &Any<'a>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Any<'a>) -> 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 TryFrom<Any<'_>> for GeneralizedTime[src]
impl TryFrom<Any<'_>> for GeneralizedTime[src]impl TryFrom<Any<'_>> for ObjectIdentifier[src]
impl TryFrom<Any<'_>> for ObjectIdentifier[src]impl<'a> TryFrom<Any<'a>> for OctetString<'a>[src]
impl<'a> TryFrom<Any<'a>> for OctetString<'a>[src]impl<'a> TryFrom<Any<'a>> for PrintableString<'a>[src]
impl<'a> TryFrom<Any<'a>> for PrintableString<'a>[src]impl<'a, T> TryFrom<Any<'a>> for SetOfRef<'a, T> where
T: Clone + Decodable<'a> + Encodable + Ord, [src]
impl<'a, T> TryFrom<Any<'a>> for SetOfRef<'a, T> where
T: Clone + Decodable<'a> + Encodable + Ord, [src]impl<'a> TryFrom<Any<'a>> for Utf8String<'a>[src]
impl<'a> TryFrom<Any<'a>> for Utf8String<'a>[src]impl<'a> Copy for Any<'a>[src]
impl<'a> Eq for Any<'a>[src]
impl<'a> StructuralEq for Any<'a>[src]
impl<'a> StructuralPartialEq for Any<'a>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Any<'a>
impl<'a> Send for Any<'a>
impl<'a> Sync for Any<'a>
impl<'a> Unpin for Any<'a>
impl<'a> UnwindSafe for Any<'a>
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