package orsetto

  1. Overview
  2. Docs
A library of assorted structured data interchange languages

Install

Dune Dependency

Authors

Maintainers

Sources

r1.1.2.tar.gz
sha512=e260412b2dd0f98cfe3dc7ed5c31a694eb31c93cd207c51fa12675b790234ee0ad3bf07d9be17a4dc266fedfe55b14c967cad7bc0c9414063eef8afd59f3d0d1

doc/orsetto.cf/Cf_data_render/Field/index.html

Module Cf_data_render.Field

A submodule containing composers for elements indexed by some totally ordered domain type.

val required : 'k -> 'r model -> ('v -> 'r) -> ('k index, 'v) bind

Use required k v f to compose a group field where a required output value with key k and value matching the model v obtained by applying the projector f to the rendered value.

val optional : 'k -> 'r model -> ('v -> 'r option) -> ('k index, 'v) bind

Use optional k v f to compose a group field where an optional output value with key k and value matching the model v obtained by applying the projector f to the rendered value. If the projector returns None then no field with key k is output.

val constant : 'k -> 'r model -> 'r -> ('k index, 'v) bind

Use constant k v def to compose a group field where a required output value with key k and value def matching the model v is produced regardless of the rendered value.

OCaml

Innovation. Community. Security.