package records

  1. Overview
  2. Docs
On This Page
  1. Unsafe interface
Legend:
Library
Module
Module type
Parameter
Class
Class type

Unsafe interface

The Unsafe.declare function returns a 's layout, which is only safe when 's is only instanciated once in this context.

val declare : string -> 's layout

Create a new layout with the given name.

val field : 's layout -> string -> 'a Type.t -> ('a, 's) Field.t

Add a field to a layout. This modifies the layout and returns the field.

val seal : 's layout -> unit

Make the layout unmodifiable. It is necessary before constructing values.

val make : 's layout -> 's t

Allocate a record of a given layout, with all fields initially unset.

val layout_name : 's layout -> string

Get the name that was given to a layout.

val layout_id : 's layout -> 's Polid.t

Get the unique identifier given to a layout.

OCaml

Innovation. Community. Security.