pub struct LoadOutcome {
pub messages: Vec<LoadMessage>,
pub structural: BTreeMap<String, Table>,
pub raw_tree: Table,
}Expand description
Outcome of loading one or more TOML files. The caller drains
messages into its echo / message buffer and walks structural
to dispatch sub-tables to their owners.
Fields§
§messages: Vec<LoadMessage>Every diagnostic produced, in load order (files in precedence order, keys in walk order). Empty on a clean load.
structural: BTreeMap<String, Table>Tables whose path matched a structural prefix. Keyed by the
full dotted path (e.g. "completion.per-language.markdown");
value is the sub-table verbatim. BTreeMap so iteration
order is stable – tests depend on this.
raw_tree: TableMerged TOML tree of every loaded file – preserves all
keys (registered + structural + unknown) verbatim. The
extend method deep-merges with later files overriding
earlier ones at scalar leaves; nested tables merge
recursively rather than being clobbered. Consumers like
workspace/configuration (Phase 4.1 follow-up) walk this
by dotted-path to surface server-namespaced config the
typed registry doesn’t know about.
Implementations§
Source§impl LoadOutcome
impl LoadOutcome
Sourcepub fn extend(&mut self, other: LoadOutcome)
pub fn extend(&mut self, other: LoadOutcome)
Append another outcome’s messages and structural sections onto this one, preserving order, AND deep-merge the raw-tree (later overrides earlier at scalar level; nested tables merge recursively).