rasn/types/
open.rs

1use super::{
2    AsnType, BitString, GeneralizedTime, InstanceOf, Integer, ObjectIdentifier, OctetString,
3    UniversalString, UtcTime, VisibleString,
4};
5use crate::{Decode, Encode};
6
7/// An "open" type representing any valid ASN.1 type.
8#[derive(AsnType, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Decode, Encode)]
9#[rasn(crate_root = "crate")]
10#[rasn(choice)]
11pub enum Open {
12    /// A bit string value.
13    BitString(BitString),
14    // BmpString(BmpString),
15    /// A bool value.
16    Bool(bool),
17    /// A generalized time value.
18    GeneralizedTime(GeneralizedTime),
19    // Ia5String(Ia5String),
20    /// A integer value.
21    Integer(Integer),
22    /// A null value.
23    Null,
24    /// A object identifier value.
25    ObjectIdentifier(ObjectIdentifier),
26    /// A octet string value.
27    OctetString(OctetString),
28    // PrintableString(PrintableString),
29    /// A universal string value.
30    UniversalString(UniversalString),
31    /// A utc time value.
32    UtcTime(UtcTime),
33    /// A visible string value.
34    VisibleString(VisibleString),
35    /// An "instance of" value.
36    InstanceOf(alloc::boxed::Box<InstanceOf<Open>>),
37}