Data_encoding.RegistrationSourceA encoding that has been registered. It can be retrieved using either list or find.
Note registration/retrieval erases the type information that is built by the combinator. In other words, t is a non-parametric type. As a result, you cannot recover an OCaml value of the type of the registered encoding. You can only perform operations where the type doesn't escape — e.g., converting between binary and json.
Descriptions and schemas of registered encodings.
Printers for the encodings.
register (def id encoding) registers the encoding with the id. It can later be found using find and providing the matching id. It will also appear in the results of list.
def id _ (see Encoding.def)splitted ~binary:(def id _) (see Encoding.splitted)dynamic_size (def id _) (see Encoding.dynamic_size)check_size _ (def id _) (see Encoding.check_size)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.
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 (def 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.