[−][src]Struct der::Any
ASN.1 ANY type: represents any explicitly tagged ASN.1 value.
Implementations
impl<'a> Any<'a>[src]
pub fn new(tag: Tag, value: &'a [u8]) -> Result<Self>[src]
pub fn tag(self) -> Tag[src]
Get the tag for this Any type.
pub fn len(self) -> Length[src]
pub fn is_empty(self) -> bool[src]
Is the value of this Any type empty?
pub fn as_bytes(self) -> &'a [u8][src]
Get the raw value for this Any type as a byte slice
pub fn bit_string(self) -> Result<BitString<'a>>[src]
Attempt to decode an ASN.1 BIT STRING
pub fn null(self) -> Result<Null>[src]
Attempt to decode an ASN.1 NULL value
pub fn octet_string(self) -> Result<OctetString<'a>>[src]
Attempt to decode an ASN.1 OCTET STRING
pub fn oid(self) -> Result<ObjectIdentifier>[src]
oid only.Attempt to decode an ASN.1 OBJECT IDENTIFIER
pub fn sequence<F, T>(self, f: F) -> Result<T> where
F: FnOnce(&mut Decoder<'a>) -> Result<T>, [src]
F: FnOnce(&mut Decoder<'a>) -> Result<T>,
Attempt to decode this value an ASN.1 SEQUENCE, creating a new
nested Decoder and calling the provided argument with it.
Trait Implementations
impl<'a> Clone for Any<'a>[src]
impl<'a> Copy for Any<'a>[src]
impl<'a> Debug for Any<'a>[src]
impl<'a> Decodable<'a> for Any<'a>[src]
pub fn decode(decoder: &mut Decoder<'a>) -> Result<Any<'a>>[src]
pub fn from_bytes(bytes: &'a [u8]) -> Result<Self>[src]
impl<'a> Encodable for Any<'a>[src]
pub fn encoded_len(&self) -> Result<Length>[src]
pub fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>[src]
pub fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>[src]
pub fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length>[src]
pub fn to_vec(&self) -> Result<Vec<u8>>[src]
impl<'a> Eq for Any<'a>[src]
impl<'a> From<BitString<'a>> for Any<'a>[src]
impl<'a> From<Null> for Any<'a>[src]
impl<'a> From<OctetString<'a>> for Any<'a>[src]
pub fn from(octet_string: OctetString<'a>) -> Any<'a>[src]
impl<'a> From<RawInteger<'a>> for Any<'a>[src]
pub fn from(integer: RawInteger<'a>) -> Any<'a>[src]
impl<'a> From<Sequence<'a>> for Any<'a>[src]
impl<'a> PartialEq<Any<'a>> for Any<'a>[src]
impl<'a> StructuralEq for Any<'a>[src]
impl<'a> StructuralPartialEq for Any<'a>[src]
impl<'a> TryFrom<&'a [u8]> for Any<'a>[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(bytes: &'a [u8]) -> Result<Any<'a>>[src]
impl<'_> TryFrom<Any<'_>> for bool[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(any: Any<'_>) -> Result<bool>[src]
impl<'_> TryFrom<Any<'_>> for i8[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(any: Any<'_>) -> Result<i8>[src]
impl<'_> TryFrom<Any<'_>> for Null[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(any: Any<'_>) -> Result<Null>[src]
impl<'_> TryFrom<Any<'_>> for ObjectIdentifier[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(any: Any<'_>) -> Result<ObjectIdentifier>[src]
impl<'a> TryFrom<Any<'a>> for BitString<'a>[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(any: Any<'a>) -> Result<BitString<'a>>[src]
impl<'a> TryFrom<Any<'a>> for RawInteger<'a>[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(any: Any<'a>) -> Result<RawInteger<'a>>[src]
impl<'a> TryFrom<Any<'a>> for OctetString<'a>[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(any: Any<'a>) -> Result<OctetString<'a>>[src]
impl<'a> TryFrom<Any<'a>> for Sequence<'a>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Any<'a>[src]
impl<'a> Send for Any<'a>[src]
impl<'a> Sync for Any<'a>[src]
impl<'a> Unpin for Any<'a>[src]
impl<'a> UnwindSafe for Any<'a>[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,