pub struct UnknownKeyInfo {
pub key: String,
pub path: PathBuf,
pub line: usize,
pub source: Option<Arc<str>>,
}Expand description
A single unknown-key violation discovered during strict-mode validation.
Flat, pattern-match-free data carrier: no nested enums to unwrap. Produced
during strict-mode validation and surfaced through
ClapfigError::unknown_keys.
source holds the full file contents at the time of validation, shared
cheaply across all infos from the same file. Renderers use it to draw
source snippets; it is None when the source is not retained (e.g. after
round-tripping through a non-data path).
Fields§
§key: StringDotted key path that was not recognized by the config schema
(e.g. "database.typo").
path: PathBufPath to the config file that contained the unknown key.
line: usize1-indexed line number where the key was found, or 0 if the line
could not be located (best-effort heuristic).
source: Option<Arc<str>>Full contents of the config file, shared across all infos from the same file. Used by renderers for source snippets.
Implementations§
Trait Implementations§
Source§impl Clone for UnknownKeyInfo
impl Clone for UnknownKeyInfo
Source§fn clone(&self) -> UnknownKeyInfo
fn clone(&self) -> UnknownKeyInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more