Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val binary_schema : t -> Binary_schema.t
Descriptions and schemas of registered encodings.
val json_schema : t -> Json.schema
val description : t -> string option
val json_pretty_printer : t -> Format.formatter -> Json.t -> unit
Printers for the encodings.
val binary_pretty_printer : t -> Format.formatter -> Bytes.t -> unit
val register : ?pp:(Format.formatter -> 'a -> unit) -> 'a Encoding.t -> unit
val slice : t -> string -> (Binary.Slicer.slice list, Binary.read_error) result
slice r b
attempts to slice a binary representation b
of some data assuming it is correctly described by the registered encoding r
. If r
does not correctly describe b
, then it returns None
.
See Binary.slice_string
for details about slicing.
val slice_all : string -> (string * Binary.Slicer.slice list) list
slice_all b
attempts to slice a binary representation b
of some data for all of the registered encodings. It returns a list of the slicing for each of the registered encodings that correctly describe b
.
See Binary.slice_string
for details about slicing.
find id
is Some r
if register id e
has been called, in which case r
matches e
. Otherwise, it is None
.
list ()
is a list of pairs (id, r)
where r
is a registered encoding for the id
.