Skip to content

Config

1 min read

Import: import system.config;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

Config

Validated snapshot with typed lookups and per-setting provenance.

public class Config

source

Returns the source that supplied the setting, or None if absent.

public fun source(key: string): Option<string>

get_string

Returns a setting or a source-aware missing-setting error.

public fun get_string(key: string): Result<string, ConfigError>

get_int

Parses a signed 32-bit decimal integer, rejecting invalid or overflowing values.

public fun get_int(key: string): Result<int, ConfigError>

get_bool

Accepts the exact boolean spellings true and false.

public fun get_bool(key: string): Result<bool, ConfigError>