Crate schematic

Source

Modules§

color
ASCII color helpers for use within error messages.
env
Built-in parse_env functions.
merge
Built-in merge functions.
schema
Generate schemas to render into outputs.
validate
Built-in validate functions.

Macros§

derive_enum

Structs§

ConfigLoadResult
The result of loading a configuration. Includes the final configuration, and all layers that were loaded.
ConfigLoader
A system for loading configuration from multiple sources in multiple formats, and generating a final result after merging and validating layers.
ConfigSetting
Represents metadata about a setting within a configuration.
HandlerError
Error for handler functions.
Layer
A layer of configuration that was loaded and used to create the final state.
MergeError
Error for merge failures.
ParseError
Error for a single parse failure.
ParserError
Error related to serde parsing.
Path
Represents the path from the configuration root to a nested field or field value.
Schema
Describes the metadata and shape of a type.
SchemaBuilder
A Schema builder.
UnsupportedFormatError
ValidateError
Error for a single validation failure.
ValidatorError
Error that contains multiple validation errors, for each setting that failed.

Enums§

ConfigError
All configuration based errors.
ExtendsFrom
Represents an extendable setting, either a string or a list of strings.
Format
Supported source configuration formats.
PathSegment
Represents all the different forms a path is composed of.
SchemaType
All possible types within a schema.
Source
Source from which to load a configuration.

Traits§

Cacher
A system for reading and writing to a cache for URL based configurations.
Config
Represents the final configuration, with all settings populated with a value.
ConfigEnum
Represents an enumerable setting for use within a Config.
PartialConfig
Represents a partial configuration of the base Config, with all settings marked as optional by wrapping the values in Option.
Schematic
Defines a schema that represents the shape of the implementing type.

Functions§

is_file_like
Returns true if the value looks like a file, by checking for file://, path separators, or supported file extensions.
is_secure_url
Returns true if the value is a secure URL, by checking for https://. This check can be bypassed for localhost URLs.
is_source_format
Returns true if the value ends in a supported file extension.
is_url_like
Returns true if the value looks like a URL, by checking for http://, https://, or www.
strip_bom
Strip a leading BOM from the string.

Type Aliases§

BoxedCacher
ConfigSettingMap
DefaultValueResult
MergeResult
Merger
A merger function that receives the previous and next values, the current context, and can return a MergeError on failure.
ParseEnvResult
TransformResult
ValidateResult
Validator
A validator function that receives a setting value to validate, the parent configuration the setting belongs to, the current context, and can return a ValidateError on failure.

Derive Macros§

Config
ConfigEnum
Schematic