Page
Library
Module
Module type
Parameter
Class
Class type
Source
Asn
SourceEmbed typed ASN.1 grammars in OCaml
Skip the notation part of Abstract Syntax Notation, and embed the abstract syntax directly in OCaml.
References
v0.2.6 — homepage
ASN.1 OBJECT IDENTIFIER
.
module OID : sig ... end
Object identifiers.
Abstract syntax of values of type 'a
.
codec enc asn
represents the syntax asn
encoded under the rules enc
.
This function performs work up-front, and is generally expected to be called in the static context on statically known syntaxes.
encode_into codec x
is the pair (n, f)
, where n
is the length of x
encoded with codec
, and f
is a function that will write the encoded x
to the first n
bytes of the provided Cstruct.t
.
Parse errors.
pp_error ppf err
pretty-prints err
on ppf
.
decode codec cs
is the pair (x, cs')
, where x
is the result of decoding the prefix of cs
with codec
and cs'
are the trailing bytes, or an error
.