Expand description
A registry written back out as the spec’s config block.
A CLI declares its settings in code with #[derive(usage::Config)], and this is the way
back out: the registry it derived, rendered as the config { prop … } block the spec
grammar defines, so docs, JSON schema, completions and every other spec consumer read
declarations made in Rust exactly as they read ones made in KDL.
Written by hand rather than through a KDL library for the same reason the argv crate’s spec writer is: this crate has no dependencies, and the grammar being emitted is the small fixed one the spec parser defines.
Structs§
- Config
Spec - Spec-only declarations generated from a settings struct.
- Prop
Spec - Documentation-only metadata for one property.
- Spec
File - A config file declaration. Slice order is ascending precedence.
- Spec
Source - A custom source declaration at the top of a spec’s
configblock.
Functions§
- spec_
kdl - The spec
configblock for these settings, as KDL. - spec_
kdl_ with - The complete spec
configblock, including metadata resolution does not use.