Struct der::Decoder [−][src]
pub struct Decoder<'a> { /* fields omitted */ }Expand description
DER decoder.
Implementations
impl<'a> Decoder<'a>[src]
impl<'a> Decoder<'a>[src]pub fn decode<T: Decodable<'a>>(&mut self) -> Result<T>[src]
pub fn decode<T: Decodable<'a>>(&mut self) -> Result<T>[src]Decode a value which impls the Decodable trait.
pub fn error<T>(&mut self, kind: ErrorKind) -> Result<T>[src]
pub fn error<T>(&mut self, kind: ErrorKind) -> Result<T>[src]Return an error with the given ErrorKind, annotating it with
context about where the error occurred.
pub fn finish<T>(self, value: T) -> Result<T>[src]
pub fn finish<T>(self, value: T) -> Result<T>[src]Finish decoding, returning the given value if there is no remaining data, or an error otherwise
pub fn is_finished(&self) -> bool[src]
pub fn is_finished(&self) -> bool[src]Have we decoded all of the bytes in this Decoder?
Returns false if we’re not finished decoding or if a fatal error
has occurred.
pub fn any_optional(&mut self) -> Result<Option<Any<'a>>>[src]
pub fn any_optional(&mut self) -> Result<Option<Any<'a>>>[src]Attempt to decode an OPTIONAL ASN.1 ANY value.
pub fn big_uint<N>(&mut self) -> Result<BigUInt<'a, N>> where
N: Unsigned + NonZero, [src]
This is supported on crate feature big-uint only.
pub fn big_uint<N>(&mut self) -> Result<BigUInt<'a, N>> where
N: Unsigned + NonZero, [src]big-uint only.Attempt to decode an ASN.1 INTEGER as a BigUInt.
pub fn bit_string(&mut self) -> Result<BitString<'a>>[src]
pub fn bit_string(&mut self) -> Result<BitString<'a>>[src]Attempt to decode an ASN.1 BIT STRING.
pub fn context_specific(&mut self) -> Result<ContextSpecific<'a>>[src]
pub fn context_specific(&mut self) -> Result<ContextSpecific<'a>>[src]Attempt to decode an ASN.1 CONTEXT-SPECIFIC field.
pub fn context_specific_optional(
&mut self
) -> Result<Option<ContextSpecific<'a>>>[src]
pub fn context_specific_optional(
&mut self
) -> Result<Option<ContextSpecific<'a>>>[src]Attempt to decode an OPTIONAL ASN.1 CONTEXT-SPECIFIC field.
pub fn generalized_time(&mut self) -> Result<GeneralizedTime>[src]
pub fn generalized_time(&mut self) -> Result<GeneralizedTime>[src]Attempt to decode an ASN.1 GeneralizedTime.
pub fn ia5_string(&mut self) -> Result<Ia5String<'a>>[src]
pub fn ia5_string(&mut self) -> Result<Ia5String<'a>>[src]Attempt to decode an ASN.1 IA5String.
pub fn octet_string(&mut self) -> Result<OctetString<'a>>[src]
pub fn octet_string(&mut self) -> Result<OctetString<'a>>[src]Attempt to decode an ASN.1 OCTET STRING.
pub fn oid(&mut self) -> Result<ObjectIdentifier>[src]
This is supported on crate feature oid only.
pub fn oid(&mut self) -> Result<ObjectIdentifier>[src]oid only.Attempt to decode an ASN.1 OBJECT IDENTIFIER.
pub fn optional<T: Choice<'a>>(&mut self) -> Result<Option<T>>[src]
pub fn optional<T: Choice<'a>>(&mut self) -> Result<Option<T>>[src]Attempt to decode an ASN.1 OPTIONAL value.
pub fn printable_string(&mut self) -> Result<PrintableString<'a>>[src]
pub fn printable_string(&mut self) -> Result<PrintableString<'a>>[src]Attempt to decode an ASN.1 PrintableString.
pub fn utf8_string(&mut self) -> Result<Utf8String<'a>>[src]
pub fn utf8_string(&mut self) -> Result<Utf8String<'a>>[src]Attempt to decode an ASN.1 UTF8String.