Struct rasn::ber::de::Decoder

source · []
pub struct Decoder<'input> { /* private fields */ }
Expand description

A BER and variants decoder. Capable of decoding BER, CER, and DER.

Implementations

Create a new Decoder from the given input and config.

Return a number of the decoded bytes by this decoder

Trait Implementations

Decode a unknown ASN.1 value identified by tag from the available input.

Decode a BOOL identified by tag from the available input.

Decode an enumerated enum’s discriminant identified by tag from the available input.

Decode a INTEGER identified by tag from the available input.

Decode a OCTET STRING identified by tag from the available input.

Decode NULL identified by tag from the available input.

Decode a OBJECT IDENTIFIER identified by tag from the available input.

Decode a BIT STRING identified by tag from the available input.

Decode a UTF8 STRING identified by tag from the available input.

Decode a GeneralizedTime identified by tag from the available input.

Decode a UtcTime identified by tag from the available input.

Decode a SEQUENCE OF D where D: Decode identified by tag from the available input.

Decode a SET OF D where D: Decode identified by tag from the available input.

Decode a SEQUENCE identified by tag from the available input. Returning a new Decoder containing the sequence’s contents to be decoded. Read more

Decode an ASN.1 value that has been explicitly prefixed with tag from the available input.

Decode a SET identified by tag from the available input. Decoding SETs works a little different than other methods, as you need to provide two types SET and SET, SET represents the complete type, and FIELDS must represent a CHOICE with a variant for each field from SET. As with SETs the field order is not guarenteed, so you’ll have map from Vec<FIELDS> to SET in decode_operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Causes self to use its Binary implementation when Debug-formatted. Read more

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted. Read more

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Formats each item in a sequence. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

Attempts to convert self into T using TryInto<T>. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.