pub struct AnyRef<'a> { /* private fields */ }
Expand description
ASN.1 ANY
: represents any explicitly tagged ASN.1 value.
This is a zero-copy reference type which borrows from the input data.
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§
Trait Implementations§
Source§impl<'a> DecodeValue<'a> for AnyRef<'a>
impl<'a> DecodeValue<'a> for AnyRef<'a>
Source§impl EncodeValue for AnyRef<'_>
impl EncodeValue for AnyRef<'_>
Source§impl<'a> From<&'a ObjectIdentifier> for AnyRef<'a>
Available on crate feature oid
only.
impl<'a> From<&'a ObjectIdentifier> for AnyRef<'a>
oid
only.Source§fn from(oid: &'a ObjectIdentifier) -> AnyRef<'a>
fn from(oid: &'a ObjectIdentifier) -> AnyRef<'a>
Source§impl<'a> From<&'a PrintableString> for AnyRef<'a>
Available on crate feature alloc
only.
impl<'a> From<&'a PrintableString> for AnyRef<'a>
alloc
only.Source§fn from(printable_string: &'a PrintableString) -> AnyRef<'a>
fn from(printable_string: &'a PrintableString) -> AnyRef<'a>
Source§impl<'a> From<&'a TeletexString> for AnyRef<'a>
Available on crate feature alloc
only.
impl<'a> From<&'a TeletexString> for AnyRef<'a>
alloc
only.Source§fn from(teletex_string: &'a TeletexString) -> AnyRef<'a>
fn from(teletex_string: &'a TeletexString) -> AnyRef<'a>
Source§impl<'a> From<Ia5StringRef<'a>> for AnyRef<'a>
impl<'a> From<Ia5StringRef<'a>> for AnyRef<'a>
Source§fn from(internationalized_string: Ia5StringRef<'a>) -> AnyRef<'a>
fn from(internationalized_string: Ia5StringRef<'a>) -> AnyRef<'a>
Source§impl<'a> From<OctetStringRef<'a>> for AnyRef<'a>
impl<'a> From<OctetStringRef<'a>> for AnyRef<'a>
Source§fn from(octet_string: OctetStringRef<'a>) -> AnyRef<'a>
fn from(octet_string: OctetStringRef<'a>) -> AnyRef<'a>
Source§impl<'a> From<PrintableStringRef<'a>> for AnyRef<'a>
impl<'a> From<PrintableStringRef<'a>> for AnyRef<'a>
Source§fn from(printable_string: PrintableStringRef<'a>) -> AnyRef<'a>
fn from(printable_string: PrintableStringRef<'a>) -> AnyRef<'a>
Source§impl<'a> From<TeletexStringRef<'a>> for AnyRef<'a>
impl<'a> From<TeletexStringRef<'a>> for AnyRef<'a>
Source§fn from(teletex_string: TeletexStringRef<'a>) -> AnyRef<'a>
fn from(teletex_string: TeletexStringRef<'a>) -> AnyRef<'a>
Source§impl<'a> From<Utf8StringRef<'a>> for AnyRef<'a>
impl<'a> From<Utf8StringRef<'a>> for AnyRef<'a>
Source§fn from(utf_string: Utf8StringRef<'a>) -> AnyRef<'a>
fn from(utf_string: Utf8StringRef<'a>) -> AnyRef<'a>
Source§impl<'a> From<VideotexStringRef<'a>> for AnyRef<'a>
impl<'a> From<VideotexStringRef<'a>> for AnyRef<'a>
Source§fn from(printable_string: VideotexStringRef<'a>) -> AnyRef<'a>
fn from(printable_string: VideotexStringRef<'a>) -> AnyRef<'a>
Source§impl<'a> Ord for AnyRef<'a>
impl<'a> Ord for AnyRef<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'a> PartialOrd for AnyRef<'a>
impl<'a> PartialOrd for AnyRef<'a>
Source§impl<'a> RefToOwned<'a> for AnyRef<'a>
Available on crate feature alloc
only.
impl<'a> RefToOwned<'a> for AnyRef<'a>
alloc
only.Source§impl TryFrom<AnyRef<'_>> for ObjectIdentifier
Available on crate feature oid
only.
impl TryFrom<AnyRef<'_>> for ObjectIdentifier
oid
only.Source§impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for BitStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for BitStringRef<'a>
Source§impl<'__der> TryFrom<AnyRef<'__der>> for GeneralizedTime
impl<'__der> TryFrom<AnyRef<'__der>> for GeneralizedTime
Source§impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for Ia5StringRef<'a>
impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for Ia5StringRef<'a>
Source§impl<'__der> TryFrom<AnyRef<'__der>> for OctetString
Available on crate feature alloc
only.
impl<'__der> TryFrom<AnyRef<'__der>> for OctetString
alloc
only.Source§impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for OctetStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for OctetStringRef<'a>
Source§impl<'__der> TryFrom<AnyRef<'__der>> for PrintableString
Available on crate feature alloc
only.
impl<'__der> TryFrom<AnyRef<'__der>> for PrintableString
alloc
only.Source§impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for PrintableStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for PrintableStringRef<'a>
Source§impl<'__der> TryFrom<AnyRef<'__der>> for TeletexString
Available on crate feature alloc
only.
impl<'__der> TryFrom<AnyRef<'__der>> for TeletexString
alloc
only.Source§impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for TeletexStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for TeletexStringRef<'a>
Source§impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for Utf8StringRef<'a>
impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for Utf8StringRef<'a>
Source§impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for VideotexStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for VideotexStringRef<'a>
Source§impl<'a> TryFrom<AnyRef<'a>> for SystemTime
Available on crate feature std
only.
impl<'a> TryFrom<AnyRef<'a>> for SystemTime
std
only.impl<'a> Copy for AnyRef<'a>
impl<'a> Eq for AnyRef<'a>
impl<'a> StructuralPartialEq for AnyRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for AnyRef<'a>
impl<'a> RefUnwindSafe for AnyRef<'a>
impl<'a> Send for AnyRef<'a>
impl<'a> Sync for AnyRef<'a>
impl<'a> Unpin for AnyRef<'a>
impl<'a> UnwindSafe for AnyRef<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
Source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes