pub type ApplicationImplicit<T, E, const TAG: u32> = TaggedValue<T, E, Implicit, { Class::APPLICATION }, TAG>;
Expand description

A helper object to parse [APPLICATION n] IMPLICIT T

A helper object implementing FromBer and FromDer, to parse explicit application-tagged values.

Examples

To parse a [APPLICATION 0] IMPLICIT INTEGER object:

use asn1_rs::{ApplicationImplicit, Error, FromBer, Integer, TaggedValue};

let bytes = &[0x60, 0x1, 0x2];

let (_, tagged) = ApplicationImplicit::<Integer, Error, 0>::from_ber(bytes).unwrap();
assert_eq!(tagged, TaggedValue::implicit(Integer::from(2_u8)));