package asn1-combinators

  1. Overview
  2. Docs
module OID = Asn_oid
val id : 'a -> 'a
val const : 'a -> 'b -> 'a
val (&.) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
val opt : 'a -> 'a option -> 'a
type 'a endo = 'a -> 'a
type ('a, 'b) sum =
  1. | L of 'a
  2. | R of 'b
val strf : ('a, Format.formatter, unit, string) Pervasives.format4 -> 'a
val kstrf : (string -> 'a) -> ('b, Format.formatter, unit, 'a) Pervasives.format4 -> 'b
val invalid_arg : ('a, unit, string, 'b) Pervasives.format4 -> 'a
val pp_list : sep:(Format.formatter -> unit -> unit) -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list -> unit
val pp_dump_list : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list -> unit
val pp_cs : Format.formatter -> Cstruct.t -> unit
module Tag : sig ... end
type tag = Tag.t
type tags = Tag.t list
module Generic : sig ... end
type bits = int * Cstruct.t
type 'a rand = unit -> 'a
type _ asn =
  1. | Iso : ('a -> 'b) * ('b -> 'a) * 'b rand option * 'a asn -> 'b asn
  2. | Fix : ('a asn -> 'a asn) * 'a Asn_cache.var -> 'a asn
  3. | Sequence : 'a sequence -> 'a asn
  4. | Sequence_of : 'a asn -> 'a list asn
  5. | Set : 'a sequence -> 'a asn
  6. | Set_of : 'a asn -> 'a list asn
  7. | Choice : 'a asn * 'b asn -> ('a, 'b) sum asn
  8. | Implicit : tag * 'a asn -> 'a asn
  9. | Explicit : tag * 'a asn -> 'a asn
  10. | Prim : 'a prim -> 'a asn
and _ element =
  1. | Required : string option * 'a asn -> 'a element
  2. | Optional : string option * 'a asn -> 'a option element
and _ sequence =
  1. | Last : 'a element -> 'a sequence
  2. | Pair : 'a element * 'b sequence -> ('a * 'b) sequence
and _ prim =
  1. | Bool : bool prim
  2. | Int : Z.t prim
  3. | Bits : bits prim
  4. | Octets : Cstruct.t prim
  5. | Null : unit prim
  6. | OID : OID.t prim
  7. | CharString : string prim
val label : string option -> string
val seq_tag : Tag.t
val set_tag : Tag.t
val tag_of_p : 'a. 'a prim -> tag
val tag_set : 'a. 'a asn -> tags
val tag : 'a. 'a -> 'a asn -> tag
type error = [
  1. | `Parse of string
]
val pp_error : Format.formatter -> [< `Parse of string ] -> unit
exception Ambiguous_syntax
exception Parse_error of error
val error : error -> 'a
val parse_error : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
module FSet : sig ... end
val validate : 'a asn -> unit
OCaml

Innovation. Community. Security.