Skip to main content

Crate einstellung

Crate einstellung 

Source

Structs§

FieldPath
This types indicates the location an error occured.
JsonFileProvider
ConfigProvider which interperts the file contents as JSON
TomlFileProvider
ConfigProvider which interperts the file contents as TOML
YamlFileProvider
ConfigProvider which interperts the file contents as YAML

Enums§

ConfigError
Possible errors which can be produces when loading a config
FileContentProvider
A generic source for file contents which can be used as a reference or an owned type. See FileContentProvider::into_owned and FileContentProvider::as_borrowed for conversion method.
Freeze
Wraps a type to make it Freezable.
FreezeCombination
Interaction of two Freezable types

Traits§

Config
Describes a Configuration which can be built from its associated ::Partial configuration. The Partial type contains optional variants of all fields of the Config.
ConfigProvider
Generic provider for loading a partial configuration. This can be any type which can produce a T: DeserializeOwned See the json, yaml and toml features and the associated JsonFileProvider, YamlFileProvider and TomlFileProvider types for the built-in implementations. The FileContentProvider provides an ergonomic interface to specifiy the location/data of an input file.
Freezable
Indicates that parts of this type can be “frozen”. This means that these parts can not be overwriten by merges in any way. See the derive macro for Config for how to mark fields as Freezable
IntoFileContentProvider
Any type from which file contents can be read (see FileContentProvider)
PartialConfig
A Partial variant of a Config. This means that every field is optional allowing incremental merging of configs.
ReaderFactory
Helper trait to read from type-erased file sources

Type Aliases§

MergeFunction
A function passed to #[config(merge ... )] needs to match this signature. See the derive macro for Config for more details on merge.
ValidationFunction
A function passed to #[config(validate ... )] needs to match this signature. See the derive macro for Config for more details on validate.

Derive Macros§

Config
Derives the Config trait for a struct and generates a companion Partial struct.