Struct ed25519_dalek::pkcs8::spki::der::Any
pub struct Any { /* private fields */ }
Available on crate feature
pkcs8
only.Expand description
ASN.1 ANY
: represents any explicitly tagged ASN.1 value.
This type provides the same functionality as AnyRef
but owns the
backing data.
Implementations§
§impl Any
impl Any
pub fn decode_as<'a, T>(&'a self) -> Result<T, Error>where
T: Choice<'a> + DecodeValue<'a>,
pub fn decode_as<'a, T>(&'a self) -> Result<T, Error>where
T: Choice<'a> + DecodeValue<'a>,
Attempt to decode this Any
type into the inner value.
pub fn encode_from<T>(msg: &T) -> Result<Any, Error>where
T: Tagged + EncodeValue,
pub fn encode_from<T>(msg: &T) -> Result<Any, Error>where
T: Tagged + EncodeValue,
Encode the provided type as an Any
value.
Trait Implementations§
§impl Choice<'_> for Any
impl Choice<'_> for Any
§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 Any
impl<'a> DecodeValue<'a> for Any
§impl EncodeValue for Any
impl EncodeValue for Any
§impl From<ObjectIdentifier> for Any
Available on crate feature alloc
only.
impl From<ObjectIdentifier> for Any
Available on crate feature
alloc
only.§fn from(oid: ObjectIdentifier) -> Any
fn from(oid: ObjectIdentifier) -> Any
Converts to this type from the input type.
§impl Ord for Any
impl Ord for Any
§impl OwnedToRef for Any
impl OwnedToRef for Any
§fn owned_to_ref(&self) -> <Any as OwnedToRef>::Borrowed<'_>
fn owned_to_ref(&self) -> <Any as OwnedToRef>::Borrowed<'_>
Creates a new object referencing back to the self for storage
§impl PartialOrd for Any
impl PartialOrd for Any
§fn partial_cmp(&self, other: &Any) -> Option<Ordering>
fn partial_cmp(&self, other: &Any) -> 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<'__der, 'a> TryFrom<&'__der Any> for BitStringRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for BitStringRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.§impl<'__der> TryFrom<&'__der Any> for GeneralizedTime
Available on crate feature alloc
only.
impl<'__der> TryFrom<&'__der Any> for GeneralizedTime
Available on crate feature
alloc
only.§impl<'__der, 'a> TryFrom<&'__der Any> for Ia5StringRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for Ia5StringRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.§impl<'__der, 'a> TryFrom<&'__der Any> for IntRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for IntRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.§impl<'__der> TryFrom<&'__der Any> for OctetString
Available on crate feature alloc
only.
impl<'__der> TryFrom<&'__der Any> for OctetString
Available on crate feature
alloc
only.§impl<'__der, 'a> TryFrom<&'__der Any> for OctetStringRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for OctetStringRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.§impl<'__der> TryFrom<&'__der Any> for PrintableString
Available on crate feature alloc
only.
impl<'__der> TryFrom<&'__der Any> for PrintableString
Available on crate feature
alloc
only.§impl<'__der, 'a> TryFrom<&'__der Any> for PrintableStringRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for PrintableStringRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.§impl<'__der> TryFrom<&'__der Any> for TeletexString
Available on crate feature alloc
only.
impl<'__der> TryFrom<&'__der Any> for TeletexString
Available on crate feature
alloc
only.§impl<'__der, 'a> TryFrom<&'__der Any> for TeletexStringRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for TeletexStringRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.§impl<'__der, 'a> TryFrom<&'__der Any> for UintRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for UintRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.§impl<'__der, 'a> TryFrom<&'__der Any> for Utf8StringRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for Utf8StringRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.§impl<'__der, 'a> TryFrom<&'__der Any> for VideotexStringRef<'a>where
'__der: 'a,
Available on crate feature alloc
only.
impl<'__der, 'a> TryFrom<&'__der Any> for VideotexStringRef<'a>where
'__der: 'a,
Available on crate feature
alloc
only.impl Eq for Any
impl StructuralPartialEq for Any
Auto Trait Implementations§
impl RefUnwindSafe for Any
impl Send for Any
impl Sync for Any
impl Unpin for Any
impl UnwindSafe for Any
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.