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
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 moresource§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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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.