Struct ed25519_dalek::pkcs8::spki::der::AnyRef
pub struct AnyRef<'a> { /* private fields */ }
Available on crate feature
pkcs8
only.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§
§impl<'a> Choice<'a> for AnyRef<'a>
impl<'a> Choice<'a> for AnyRef<'a>
§fn can_decode(_: Tag) -> bool
fn can_decode(_: Tag) -> bool
Is the provided
Tag
decodable as a variant of this CHOICE
?§impl<'a> DecodeValue<'a> for AnyRef<'a>
impl<'a> DecodeValue<'a> for AnyRef<'a>
§impl EncodeValue for AnyRef<'_>
impl EncodeValue for AnyRef<'_>
§impl<'a> From<&'a ObjectIdentifier> for AnyRef<'a>
impl<'a> From<&'a ObjectIdentifier> for AnyRef<'a>
§fn from(oid: &'a ObjectIdentifier) -> AnyRef<'a>
fn from(oid: &'a ObjectIdentifier) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> From<&'a PrintableString> for AnyRef<'a>
impl<'a> From<&'a PrintableString> for AnyRef<'a>
§fn from(printable_string: &'a PrintableString) -> AnyRef<'a>
fn from(printable_string: &'a PrintableString) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> From<&'a TeletexString> for AnyRef<'a>
impl<'a> From<&'a TeletexString> for AnyRef<'a>
§fn from(teletex_string: &'a TeletexString) -> AnyRef<'a>
fn from(teletex_string: &'a TeletexString) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> From<Ia5StringRef<'a>> for AnyRef<'a>
impl<'a> From<Ia5StringRef<'a>> for AnyRef<'a>
§fn from(internationalized_string: Ia5StringRef<'a>) -> AnyRef<'a>
fn from(internationalized_string: Ia5StringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> From<OctetStringRef<'a>> for AnyRef<'a>
impl<'a> From<OctetStringRef<'a>> for AnyRef<'a>
§fn from(octet_string: OctetStringRef<'a>) -> AnyRef<'a>
fn from(octet_string: OctetStringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> From<PrintableStringRef<'a>> for AnyRef<'a>
impl<'a> From<PrintableStringRef<'a>> for AnyRef<'a>
§fn from(printable_string: PrintableStringRef<'a>) -> AnyRef<'a>
fn from(printable_string: PrintableStringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> From<TeletexStringRef<'a>> for AnyRef<'a>
impl<'a> From<TeletexStringRef<'a>> for AnyRef<'a>
§fn from(teletex_string: TeletexStringRef<'a>) -> AnyRef<'a>
fn from(teletex_string: TeletexStringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> From<Utf8StringRef<'a>> for AnyRef<'a>
impl<'a> From<Utf8StringRef<'a>> for AnyRef<'a>
§fn from(utf_string: Utf8StringRef<'a>) -> AnyRef<'a>
fn from(utf_string: Utf8StringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> From<VideotexStringRef<'a>> for AnyRef<'a>
impl<'a> From<VideotexStringRef<'a>> for AnyRef<'a>
§fn from(printable_string: VideotexStringRef<'a>) -> AnyRef<'a>
fn from(printable_string: VideotexStringRef<'a>) -> AnyRef<'a>
Converts to this type from the input type.
§impl<'a> Ord for AnyRef<'a>
impl<'a> Ord for AnyRef<'a>
§impl<'a> PartialEq for AnyRef<'a>
impl<'a> PartialEq for AnyRef<'a>
§impl<'a> PartialOrd for AnyRef<'a>
impl<'a> PartialOrd for AnyRef<'a>
§fn partial_cmp(&self, other: &AnyRef<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &AnyRef<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl<'a> RefToOwned<'a> for AnyRef<'a>
impl<'a> RefToOwned<'a> for AnyRef<'a>
§fn ref_to_owned(&self) -> <AnyRef<'a> as RefToOwned<'a>>::Owned
fn ref_to_owned(&self) -> <AnyRef<'a> as RefToOwned<'a>>::Owned
Creates a new object taking ownership of the data
§impl TryFrom<AnyRef<'_>> for ObjectIdentifier
impl TryFrom<AnyRef<'_>> for ObjectIdentifier
§impl<'__der, 'a> TryFrom<AnyRef<'__der>> for BitStringRef<'a>where
'__der: 'a,
impl<'__der, 'a> TryFrom<AnyRef<'__der>> for BitStringRef<'a>where
'__der: 'a,
§impl<'__der> TryFrom<AnyRef<'__der>> for GeneralizedTime
impl<'__der> TryFrom<AnyRef<'__der>> for GeneralizedTime
§impl<'__der, 'a> TryFrom<AnyRef<'__der>> for Ia5StringRef<'a>where
'__der: 'a,
impl<'__der, 'a> TryFrom<AnyRef<'__der>> for Ia5StringRef<'a>where
'__der: 'a,
§impl<'__der> TryFrom<AnyRef<'__der>> for OctetString
impl<'__der> TryFrom<AnyRef<'__der>> for OctetString
§impl<'__der, 'a> TryFrom<AnyRef<'__der>> for OctetStringRef<'a>where
'__der: 'a,
impl<'__der, 'a> TryFrom<AnyRef<'__der>> for OctetStringRef<'a>where
'__der: 'a,
§impl<'__der> TryFrom<AnyRef<'__der>> for PrintableString
impl<'__der> TryFrom<AnyRef<'__der>> for PrintableString
§impl<'__der, 'a> TryFrom<AnyRef<'__der>> for PrintableStringRef<'a>where
'__der: 'a,
impl<'__der, 'a> TryFrom<AnyRef<'__der>> for PrintableStringRef<'a>where
'__der: 'a,
§impl<'__der> TryFrom<AnyRef<'__der>> for TeletexString
impl<'__der> TryFrom<AnyRef<'__der>> for TeletexString
§impl<'__der, 'a> TryFrom<AnyRef<'__der>> for TeletexStringRef<'a>where
'__der: 'a,
impl<'__der, 'a> TryFrom<AnyRef<'__der>> for TeletexStringRef<'a>where
'__der: 'a,
§impl<'__der, 'a> TryFrom<AnyRef<'__der>> for Utf8StringRef<'a>where
'__der: 'a,
impl<'__der, 'a> TryFrom<AnyRef<'__der>> for Utf8StringRef<'a>where
'__der: 'a,
§impl<'__der, 'a> TryFrom<AnyRef<'__der>> for VideotexStringRef<'a>where
'__der: 'a,
impl<'__der, 'a> TryFrom<AnyRef<'__der>> for VideotexStringRef<'a>where
'__der: 'a,
§impl<'a, T> TryFrom<AnyRef<'a>> for ContextSpecific<T>where
T: Decode<'a>,
impl<'a, T> TryFrom<AnyRef<'a>> for ContextSpecific<T>where
T: Decode<'a>,
impl<'a> Copy for AnyRef<'a>
impl<'a> Eq for AnyRef<'a>
impl<'a> StructuralPartialEq for AnyRef<'a>
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more
§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
§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.
§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
.
§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.