package orsetto

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A submodule to encapsulate functions for use with data rendering models.

Use new index p to compose indexes for tables and structures encoded as CBOR maps with keys sorted in deterministic order. Use the ~model parameter to provide the data model for keys that are not primitive.

val tagged : int64 -> 'v Cf_data_render.model -> 'v Cf_data_render.model

Use tagged n m to make a data rendering model that applies the CBOR tag n to the data rendered by m. Such models can only be rendered into encoding schemes by the scheme function for CBOR (see below).

Use scheme m to make an encoding scheme for values according to an abstract data model m.

val packet : 'v Cf_data_render.model -> 'v -> unit t

Use packet m v to make the CBOR encoding of v according to the data render model m.