Macros§
- asn1_
tagged - Macro to generate a ASN1Tagged and ViewWithASN1Tagged trait impl
Structs§
- ASN1
- A combinator wrapper that also emits a tag before parsing/serializing the inner value
- ASN1Tag
- Combinator for ASN.1 tags
- Base128U
Int - Combinator for a single identifier component in the OBJECT IDENTIFIER ASN.1 type (called “arc” X.690)
- BigInt
- If it’s expected that an INTEGER field is larger than the Int type, then use this combinator to read it as an octet string (with some minimality constraints).
- BigInt
Owned - BigInt
Value - BitString
- Combainator for BIT STRING in ASN.1 Essentially a refined version of OctetString where we require that the first bit correctly specifies the trailing zeros
- BitString
Value - BitString
Value Owned - Boolean
- Combainator for BOOLEAN in ASN.1 TRUE = 0x01 0x01 0xff FALSE = 0x01 0x01 0x00
- Explicit
Tag - Explicit tagging wrapps the inner combinator in a new TLV tuple Equivalent to ImplicitTag(tag, LengthWrapped(inner))
- Generalized
Time - TODO: this file is a bit of mess, clean it up
- Generalized
Time Inner - Generalized
Time Value Inner - IA5String
- Combinator for IA5String in ASN.1 Essentially a wrapper around Octet that checks that each byte is <= 127
- IA5String
Pred - A condition that the minimal encoding is used
- Implicit
Tag - Implicit tagging replaces the tag value in the ASN1Tagged trait, but otherwise parses/serializes exactly the same way as the inner combinator
- Integer
- Combinator for ASN.1 integers (without the preceding tag) This combinator uses IntegerInner with the additional constraint of is_min_num_bytes_signed
- Length
- Combinator for the length field in a TLV tuple
- Length
Wrapped - Wrap the inner combinator in a Length-Buffer pair
- Length
Wrapped Cont - The function |i| AndThen<Bytes, T>
- Minimal
BigInt Pred - A condition that the minimal encoding is used
- Null
- Combainator for NULL in ASN.1 NULL = 05 00 (with tag)
- Null
Value - Object
Identifier - Combinator for ASN.1 Object Identifier
- Object
Identifier Value - Octet
String - Combainator for OCTET STRING in ASN.1
- Printable
String - Combinator for PrintableString in ASN.1 Essentially a wrapper around Octet that checks that each byte is <= 127
- Printable
String Pred - A condition that the minimal encoding is used
- Sequence
Of - SEQUENCE OF in ASN.1
- TagValue
- UTCTime
- Parse UTCTime string in 6 formats
- UTCTime
Inner - UTCTime
Value Inner - UTF8
String - Combainator for UTF8String in ASN.1
- VarInt
- VarUInt
- Combinator for variable-length integers in big-endian The length is assumed to be <= uint_size!()
Enums§
Traits§
- ASN1
Tagged - A trait for combinators to mark their original tags (e.g. 0x02 for INTEGER)
- View
WithAS N1Tagged - An additional property that if an ASN1Tagged implements View, then the viewed version preserves the tag
Functions§
Type Aliases§
- Generalized
Time Value - Generalized
Time Value Owned - IA5String
Value - IA5String
Value Owned - Integer
Value - Length
Value - NOTE: this should fit into a VarUIntResult
- Object
Identifier Value Owned - Printable
String Value - Printable
String Value Owned - Sequence
OfValue - Spec
BigInt Value - BigInt represents the integer with a sequence of bytes in big-endian order (same as ASN.1) and the most significant bit of the first byte is the sign bit.
- Spec
BitString Value - Spec
Generalized Time Value - SpecI
A5String Value - Spec
Object Identifier Value - Spec
Printable String Value - SpecUTC
Time Value - SpecUT
F8String Value - UInt
- Signed/unsigned integer types used to represent values in ASN.1 All definitions below are relative to these two types
- UTCTime
Value - UTCTime
Value Owned - UTF8
String Value - UTF8
String Value Owned - VarInt
Result - VarU
IntResult