Skip to main content

Crate zonfig

Crate zonfig 

Source
Expand description

Dynamic configuration loading and hot reload.

zonfig loads JSON, YAML, and TOML files into Serde-compatible Rust structures. It can also watch a file and publish updates when the file changes.

Structs§

Config
A cloneable handle to the latest configuration value.
WatchOptions
Options used when watching a configuration file.

Enums§

Error
Errors returned by configuration loading and watching.
Format
Supported configuration file formats.

Functions§

load
Loads a configuration file and deserializes it into T.
load_with_format
Loads a configuration file with an explicitly selected format.
watch
Watches a configuration file and publishes valid updates.
watch_with_format
Watches a configuration file using an explicitly selected format.
watch_with_options
Watches a configuration file using custom options.

Type Aliases§

Result
Convenient result type used by zonfig.
WatchedConfig
A watched configuration handle.