module Schema:sig..end
This module is a set of fields (Field.t and FieldRO.t) that can be addressed by their name (as string). Value can be set and retrieved as string only. However, the value itself is stored in its native type.
type ('a, 'b) value
A value.
type ('a, 'b) t
A schema.
val create : ?case_insensitive:bool -> PropList.name -> ('a, 'b) tCreate a schema.
val mem : ('a, 'b) t -> PropList.name -> boolCheck that the given field name exists.
val get : ('a, 'b) t -> PropList.Data.t -> PropList.name -> stringget t data nm Retrieve the string value of field nm from schema t
stores in data.
val set : ('a, 'b) t ->
PropList.Data.t -> PropList.name -> ?context:'a -> string -> unitset t data nm ~context str Parse string value str in ~context and
stores it in data for field nm of schema t.
val fold : ('a -> PropList.name -> 'b -> (unit -> string) option -> 'a) ->
'a -> ('c, 'b) t -> 'afold f acc t Apply f acc field_name field_extra field_help in turn
to all fields of schema t.
val iter : (PropList.name -> 'a -> (unit -> string) option -> unit) ->
('b, 'a) t -> unitSame as PropList.Schema.fold except no accumulator are involved.
val name : ('a, 'b) t -> PropList.nameGet the name of the schema.