B0_meta.KeyKeys.
val make :
?doc:string ->
?default:'a ->
string ->
pp_value:'a B0_std.Fmt.t ->
'a keymake name ~default ~pp_value ~doc is a new metadata key with:
name the name used for UI interaction. It should be globally unique, the module automatically renames it if that happens not to be the case.default is an optional default value for the key when undefined in a dictionary.pp_value is used to format the key values for end-users.doc is a documentation string for the key.val make_tag : ?doc:string -> string -> bool keymake_tag ~doc name is a new tag key named name. Denote booleans that are false when absent (that's their default value). In effect this is strictly equivalent to:
make ?doc name ~default:false ~pp_value:Fmt.boolval name : 'a key -> stringname k is k's name.
val default : 'a key -> 'a optiondefault k is a default value for the key (if any).
val get_default : 'a key -> 'aget_default k is the default value of k. Raises Invalid_argument if k has no default.
val doc : 'a key -> stringdoc k is k's documentation string.
val pp_value : 'a key -> 'a B0_std.Fmt.tpp k is k's value formatter.
val pp_name : 'a key B0_std.Fmt.tpp_name k formats k's name with pp_name_str.
val pp_name_str : string B0_std.Fmt.tpp_name_str formats a key name.
val pp : t B0_std.Fmt.tpp formats the key name with pp_name_str
For UI purposes a map from key names to existential keys is maintained by the module.
val find : string -> t optionfind n is the key named n (if any).
val get : string -> tget n is the key named n. Raises Invalid_argument if there is no such key.
get_or_suggest n is the key named n or or a (possibly empty) list of suggested values whose name could match n.
val get_or_hint : string -> (t, string) Stdlib.resultget_or_hint n is the key named n or an error message that indicates that n could not be found with suggested names.
val list : unit -> t listval fold : (t -> 'a -> 'a) -> 'a -> 'aval get_list_or_hint :
all_if_empty:bool ->
string list ->
(t list, string) Stdlib.result