Header menu logo UnionConfig

ConfigValue Module

 Helpers for extracting typed values from ConfigValue.
 Use these with a `read` function that returns ConfigValue option:
   let port = read PORT |> ConfigValue.int
   let apiKey = read XAI_API_KEY |> ConfigValue.stringOption

Functions and values

Function or value Description

bool cv

Full Usage: bool cv

Parameters:
Returns: bool

Extract bool from Required config

cv : ConfigValue option
Returns: bool

boolOption cv

Full Usage: boolOption cv

Parameters:
Returns: bool option

Extract bool from Optional config

cv : ConfigValue option
Returns: bool option

custom parser cv

Full Usage: custom parser cv

Parameters:
Returns: 'T

Parse custom type from Required config using provided parser

parser : string -> 'T option
cv : ConfigValue option
Returns: 'T

customOption parser cv

Full Usage: customOption parser cv

Parameters:
Returns: 'T option

Parse custom type from Optional config using provided parser

parser : string -> 'T option
cv : ConfigValue option
Returns: 'T option

float cv

Full Usage: float cv

Parameters:
Returns: float

Extract float from Required config

cv : ConfigValue option
Returns: float

floatOption cv

Full Usage: floatOption cv

Parameters:
Returns: float option

Extract float from Optional config

cv : ConfigValue option
Returns: float option

int cv

Full Usage: int cv

Parameters:
Returns: int

Extract int from Required config

cv : ConfigValue option
Returns: int

intOption cv

Full Usage: intOption cv

Parameters:
Returns: int option

Extract int from Optional config

cv : ConfigValue option
Returns: int option

string cv

Full Usage: string cv

Parameters:
Returns: string

Extract string from Required config (converts any type to string)

cv : ConfigValue option
Returns: string

stringOption cv

Full Usage: stringOption cv

Parameters:
Returns: string option

Extract string from Optional config (converts any type to string)

cv : ConfigValue option
Returns: string option

Type something to start searching.