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§
Source§impl Any
impl Any
Sourcepub 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.
Sourcepub 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§
Source§impl<'a> DecodeValue<'a> for Any
impl<'a> DecodeValue<'a> for Any
Source§impl EncodeValue for Any
impl EncodeValue for Any
Source§impl From<ObjectIdentifier> for Any
Available on crate feature alloc
only.
impl From<ObjectIdentifier> for Any
Available on crate feature
alloc
only.Source§fn from(oid: ObjectIdentifier) -> Any
fn from(oid: ObjectIdentifier) -> Any
Converts to this type from the input type.
Source§impl Ord for Any
impl Ord for Any
Source§impl OwnedToRef for Any
impl OwnedToRef for Any
Source§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
Source§impl PartialOrd for Any
impl PartialOrd for Any
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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 Freeze for Any
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
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], 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.