Trait rasn::Decoder [−][src]
A data format decode any ASN.1 data type.
Associated Types
Loading content...Required methods
fn peek_tag(&self) -> Result<Tag, Self::Error>
[src]
Peek at the next available tag.
fn decode_any(&mut self, tag: Tag) -> Result<Vec<u8>, Self::Error>
[src]
Decode a unknown ASN.1 value identified by tag
from the available input.
fn decode_bit_string(&mut self, tag: Tag) -> Result<BitString, Self::Error>
[src]
Decode a BIT STRING
identified by tag
from the available input.
fn decode_bool(&mut self, tag: Tag) -> Result<bool, Self::Error>
[src]
Decode a BOOL
identified by tag
from the available input.
fn decode_enumerated(&mut self, tag: Tag) -> Result<Integer, Self::Error>
[src]
Decode an enumerated enum’s discriminant identified by tag
from the available input.
fn decode_integer(&mut self, tag: Tag) -> Result<Integer, Self::Error>
[src]
Decode a INTEGER
identified by tag
from the available input.
fn decode_null(&mut self, tag: Tag) -> Result<(), Self::Error>
[src]
Decode NULL
identified by tag
from the available input.
fn decode_object_identifier(
&mut self,
tag: Tag
) -> Result<ObjectIdentifier, Self::Error>
[src]
&mut self,
tag: Tag
) -> Result<ObjectIdentifier, Self::Error>
Decode a OBJECT IDENTIFIER
identified by tag
from the available input.
fn decode_sequence(&mut self, tag: Tag) -> Result<Self, Self::Error>
[src]
Decode a SEQUENCE
identified by tag
from the available input. Returning
a new Decoder
containing the sequence’s contents to be decoded.
fn decode_sequence_of<D: Decode>(
&mut self,
tag: Tag
) -> Result<Vec<D>, Self::Error>
[src]
&mut self,
tag: Tag
) -> Result<Vec<D>, Self::Error>
Decode a SEQUENCE OF D
where D: Decode
identified by tag
from the available input.
fn decode_set(&mut self, tag: Tag) -> Result<Self, Self::Error>
[src]
Decode a SET
identified by tag
from the available input. Returning
a new Decoder
containing the sequence’s contents to be decoded.
fn decode_set_of<D: Decode + Ord>(
&mut self,
tag: Tag
) -> Result<BTreeSet<D>, Self::Error>
[src]
&mut self,
tag: Tag
) -> Result<BTreeSet<D>, Self::Error>
Decode a SET OF D
where D: Decode
identified by tag
from the available input.
fn decode_octet_string(&mut self, tag: Tag) -> Result<Vec<u8>, Self::Error>
[src]
Decode a OCTET STRING
identified by tag
from the available input.
fn decode_utf8_string(&mut self, tag: Tag) -> Result<Utf8String, Self::Error>
[src]
Decode a UTF8 STRING
identified by tag
from the available input.
fn decode_explicit_prefix<D: Decode>(
&mut self,
tag: Tag
) -> Result<D, Self::Error>
[src]
&mut self,
tag: Tag
) -> Result<D, Self::Error>
Decode an ASN.1 value that has been explicitly prefixed with tag
from the available input.
fn decode_utc_time(&mut self, tag: Tag) -> Result<UtcTime, Self::Error>
[src]
Decode a UtcTime
identified by tag
from the available input.
fn decode_generalized_time(
&mut self,
tag: Tag
) -> Result<GeneralizedTime, Self::Error>
[src]
&mut self,
tag: Tag
) -> Result<GeneralizedTime, Self::Error>
Decode a GeneralizedTime
identified by tag
from the available input.
Implementors
impl<'input> Decoder for Decoder<'input>
[src]
type Error = Error
fn peek_tag(&self) -> Result<Tag, Error>
[src]
fn decode_any(&mut self, tag: Tag) -> Result<Vec<u8>, Error>
[src]
fn decode_bool(&mut self, tag: Tag) -> Result<bool, Error>
[src]
fn decode_enumerated(&mut self, tag: Tag) -> Result<Integer, Error>
[src]
fn decode_integer(&mut self, tag: Tag) -> Result<Integer, Error>
[src]
fn decode_octet_string(&mut self, tag: Tag) -> Result<Vec<u8>, Error>
[src]
fn decode_null(&mut self, tag: Tag) -> Result<(), Error>
[src]
fn decode_object_identifier(
&mut self,
tag: Tag
) -> Result<ObjectIdentifier, Error>
[src]
&mut self,
tag: Tag
) -> Result<ObjectIdentifier, Error>
fn decode_bit_string(&mut self, tag: Tag) -> Result<BitString, Error>
[src]
fn decode_utf8_string(&mut self, tag: Tag) -> Result<Utf8String, Error>
[src]
fn decode_generalized_time(
&mut self,
tag: Tag
) -> Result<GeneralizedTime, Error>
[src]
&mut self,
tag: Tag
) -> Result<GeneralizedTime, Error>
fn decode_utc_time(&mut self, tag: Tag) -> Result<UtcTime, Error>
[src]
fn decode_sequence_of<D: Decode>(&mut self, tag: Tag) -> Result<Vec<D>, Error>
[src]
fn decode_set_of<D: Decode + Ord>(
&mut self,
tag: Tag
) -> Result<BTreeSet<D>, Error>
[src]
&mut self,
tag: Tag
) -> Result<BTreeSet<D>, Error>