Skip to main content

Module config

Module config 

Source
Expand description

High-level confique integration and generate-template rendering.

This module loads .env values, builds a Figment runtime source graph, extracts it into a confique schema for defaults and validation, renders example templates that mirror the same include tree, and writes JSON Schema files that editors can use for completion and validation. YAML templates can also be split across nested schema sections.

Re-exports§

pub use crate::config_schema::target::ConfigSchemaTarget;
pub use crate::config_schema::write::config_schema_targets_for_path;
pub use crate::config_schema::write::write_config_schema;
pub use crate::config_schema::write::write_config_schemas;
pub use crate::transparent_section::ArraySection;

Structs§

ConfigTemplateTarget
Generated template content for one output path.
ConfiqueEnvProvider
Figment provider that maps environment variables declared in confique schema metadata onto their exact field paths.
TransparentSectionContext
Runtime metadata used to adapt transparent array sections during loading.

Enums§

ConfigFormat
File format used when loading config files or rendering templates.

Traits§

ConfigSchema
A confique schema that can expose recursive include paths and template section layout.

Functions§

build_config_figment
Builds the Figment runtime source graph for a config tree.
load_config
Loads a complete confique schema from a root config path.
load_config_from_figment
Extracts and validates a config schema from a Figment source graph.
load_config_with_figment
Loads a config schema and returns the Figment graph used for runtime loading.
template_for_path
Renders the default template for one path.
template_targets_for_paths
Collects all template targets that should be generated for a config tree.
template_targets_for_paths_with_schema
Collects template targets and binds generated templates to JSON Schemas.
trace_config_sources
Emits Figment source metadata for every leaf field at TRACE level.
write_config_templates
Writes all generated config templates for a config tree.
write_config_templates_with_schema
Writes all generated config templates with editor schema bindings.

Type Aliases§

ConfigResult
Result type used by the high-level configuration API.