package oasis

  1. Overview
  2. Docs

This module defines a read-only field. However, it can only be set through Schema.set if the field is attached to a schema.

val create : ?schema:('a, 'b) Schema.t -> ?name:name -> ?parse:(?context:'a -> string -> 'c) -> ?print:('c -> string) -> ?default:'c -> ?update:(?context:'a -> 'c -> 'c -> 'c) -> ?help:(unit -> string) -> 'b -> Data.t -> 'c

Create a read-only field. The returned function can be used to retrieve the value of the field.