package records

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 's layout
type ('a, 's) field
val declare : string -> 's layout
val field : 's layout -> string -> 'a Type.t -> ('a, 's) field
val field_name : ('a, 's) field -> string
val field_type : ('a, 's) field -> 'a Type.t
val seal : 's layout -> unit
exception ModifyingSealedStruct of string
val layout_name : 's layout -> string
val layout_id : 's layout -> 's Polid.t
type !'s t = {
  1. layout : 's layout;
  2. content : 's;
}
val make : 's layout -> 's t
val get_layout : 'a t -> 'a layout
exception AllocatingUnsealedStruct of string
val get : 's t -> ('a, 's) field -> 'a
val set : 's t -> ('a, 's) field -> 'a -> unit
exception UndefinedField of string
val to_json : 'a t -> Yojson.Basic.json
val of_json : 'a layout -> Yojson.Basic.json -> 'a t
val layout_type : 'a layout -> 'a t Type.t
val equal : 'a layout -> 'b layout -> ('a, 'b) Polid.equal
val format : Format.formatter -> 'a t -> unit
val declare1 : name:string -> f1_name:string -> f1_type:'a Type.t -> 's layout * ('a, 's) field
val declare2 : name:string -> f1_name:string -> f1_type:'a1 Type.t -> f2_name:string -> f2_type:'a2 Type.t -> 's layout * ('a1, 's) field * ('a2, 's) field
val declare3 : name:string -> f1_name:string -> f1_type:'a1 Type.t -> f2_name:string -> f2_type:'a2 Type.t -> f3_name:string -> f3_type:'a3 Type.t -> 's layout * ('a1, 's) field * ('a2, 's) field * ('a3, 's) field
val declare4 : name:string -> f1_name:string -> f1_type:'a1 Type.t -> f2_name:string -> f2_type:'a2 Type.t -> f3_name:string -> f3_type:'a3 Type.t -> f4_name:string -> f4_type:'a4 Type.t -> 's layout * ('a1, 's) field * ('a2, 's) field * ('a3, 's) field * ('a4, 's) field
OCaml

Innovation. Community. Security.