Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Arguments are documented serializers-deserializers for parameters.
type 'a t = 'a Resto.Arg.arg
The type of an argument.
type 'a arg = 'a t
val make :
?descr:string ->
name:string ->
destruct:(string -> ('a, string) result) ->
construct:('a -> string) ->
unit ->
'a arg
make ?descr ~name ~destruct ~construct ()
is an argument. The values of descr
and name
are used for documentation purpose only. The values of destruct
and construct
are used for conversion from/to string
s. Note that it is expected that destruct
and construct
round-trip (modulo the result
error wrapping).
descr
is a type for the documentation of a t
.
val int : int arg
int
, int32
, int64
, float
, and string
are arguments for the corresponding built-in types of OCaml.
val int32 : int32 arg
val int64 : int64 arg
val float : float arg
val string : string arg