Expand description
§ASN.1 Data Types
The types modules is a collection of Rust types and data structures that
are defined to represent various ASN.1 data types, and renamed to use
ASN.1’s terminology.
Re-exports§
pub use self::constraints::Constraint;pub use self::constraints::Constraints;pub use self::constraints::Extensible;pub use self::constraints::InnerSubtypeConstraint;
Modules§
- constraints
- Constraints of values on a given type.
- fields
- Representing all fields for a
SEQUENCEorSETtype. - variants
- Representing all possible variants for a
CHOICEtype.
Structs§
- Any
- Represents a complete encoded ASN.1 value of any type. Usually identified
with an
ObjectIdentifier. - BmpString
- A Basic Multilingual Plane (BMP) string, which is a subtype of
super::UniversalStringcontaining only the BMP set of characters. - Constrained
Integer - An integer which has encoded constraint range between
STARTandEND. - Explicit
- A newtype wrapper that will explicitly tag its value with
T’s tag. - Fixed
Octet String - An
OCTET STRINGwhich has a fixed size range. This type uses const generics to be able to place the octet string on the stack rather than the heap. - General
String - A “general” string containing the
C0Controls plane,SPACE, Basic Latin,DELETE, and Latin-1 Supplement characters. - Graphic
String - A “graphic” string containing the
SPACE, Basic Latin, and Latin-1 Supplement characters. - Ia5String
- A string which only contains ASCII characters.
- Identifier
- The identifier of an ASN.1 type in an ASN.1 module. In most cases, the identifier is the human-readable type name as defined in the ASN.1 module. For built-in ASN.1 types, the XML tag names as defined in ITU-T X.680 (2021/02) §12.36 are used. Some ASN.1 types, most notably open types, do not have a consistent identifier.
- Implicit
- A newtype wrapper that will implicitly tag its value with
T’s tag. - Instance
Of - An instance of a defined object class.
- Integer
- A dynamically sized integer type. This type is similar to
num_bigint::BigIntin that it allows for integers of arbitary size making it ideal for handling ASN.1INTEGERtypes, in addition this type includes small integer optimisations accounting for the fact integers decoded in ASN.1 don’t exceed native platform widths. - Numeric
String - A string which can only contain numbers or
SPACEcharacters. - Object
Identifier - A global unique identifier that identifies an concept, such as a
organisation, or encoding rules. The “owned” version of
Oid. - Octet
String - The
OCTET STRINGtype. - Oid
- A reference to a global unique identifier that identifies an concept, such as a organisation, or encoding rules.
- Printable
String - A string, which contains the characters defined in X.680 41.4 Section, Table 10.
- SetOf
- The
SET OFtype - an unordered list of zero, one or more values of the component type. - Tag
- An abstract representation of an ASN.1 tag that uniquely identifies a type within a ASN.1 module for codecs.
- Teletex
String - A string, which contains the characters defined in T.61 standard.
- Utf8
String - A UTF-8–encoded, growable string.
- Visible
String - A string which contains a subset of the ISO 646 character set.
Type should be constructed by using
try_fromorfrommethods.
Enums§
- Class
- The class of tag identifying its category.
- Open
- An “open” type representing any valid ASN.1 type.
- TagTree
- The root or node in tree representing all of potential tags in a ASN.1 type.
Traits§
- AsnType
- A trait representing any type that can represented in ASN.1.
- Choice
- A
CHOICEvalue. - Constructed
- A
SETorSEQUENCEvalue.RLis the number of fields in the “root component list”.ELis the number of fields in the list of extensions. - Decode
Choice - A
CHOICEvalue. - Enumerated
- A
ENUMERATEDvalue. - Integer
Type - Represents a integer type in Rust that can be decoded or encoded into any ASN.1 codec.
- Real
Type - Represents a real type in Rust that can be decoded or encoded into any ASN.1 codec.
Type Aliases§
- BitStr
- A reference to a
BIT STRINGtype. - BitString
- The
BIT STRINGtype. /// ## Usage ASN1 declaration such as … - Date
- The
Datetype. - Fixed
BitString - A fixed length
BIT STRINGtype. - Generalized
Time - The
GeneralizedTimetype. - Sequence
Of - The
SEQUENCE OFtype. - Universal
String - The
UniversalStringtype. - UtcTime
- The
UTCTimetype.
Derive Macros§
- AsnType
- An automatic derive of the
AsnTypetrait.