pub struct Any { /* private fields */ }
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>where
T: Choice<'a> + DecodeValue<'a>,
pub fn decode_as<'a, T>(&'a self) -> Result<T>where
T: Choice<'a> + DecodeValue<'a>,
Attempt to decode this Any
type into the inner value.
Sourcepub fn encode_from<T>(msg: &T) -> Result<Self>where
T: Tagged + EncodeValue,
pub fn encode_from<T>(msg: &T) -> Result<Self>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
impl From<ObjectIdentifier> for Any
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§impl PartialOrd for Any
impl PartialOrd for Any
Source§impl<'__der: 'a, 'a> TryFrom<&'__der Any> for BitStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<&'__der Any> for BitStringRef<'a>
Source§impl<'__der> TryFrom<&'__der Any> for GeneralizedTime
impl<'__der> TryFrom<&'__der Any> for GeneralizedTime
Source§impl<'__der: 'a, 'a> TryFrom<&'__der Any> for Ia5StringRef<'a>
impl<'__der: 'a, 'a> TryFrom<&'__der Any> for Ia5StringRef<'a>
Source§impl<'__der> TryFrom<&'__der Any> for OctetString
impl<'__der> TryFrom<&'__der Any> for OctetString
Source§impl<'__der: 'a, 'a> TryFrom<&'__der Any> for OctetStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<&'__der Any> for OctetStringRef<'a>
Source§impl<'__der> TryFrom<&'__der Any> for PrintableString
impl<'__der> TryFrom<&'__der Any> for PrintableString
Source§impl<'__der: 'a, 'a> TryFrom<&'__der Any> for PrintableStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<&'__der Any> for PrintableStringRef<'a>
Source§impl<'__der> TryFrom<&'__der Any> for TeletexString
impl<'__der> TryFrom<&'__der Any> for TeletexString
Source§impl<'__der: 'a, 'a> TryFrom<&'__der Any> for TeletexStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<&'__der Any> for TeletexStringRef<'a>
Source§impl<'__der: 'a, 'a> TryFrom<&'__der Any> for Utf8StringRef<'a>
impl<'__der: 'a, 'a> TryFrom<&'__der Any> for Utf8StringRef<'a>
Source§impl<'__der: 'a, 'a> TryFrom<&'__der Any> for VideotexStringRef<'a>
impl<'__der: 'a, 'a> TryFrom<&'__der Any> for VideotexStringRef<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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]>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.