pub struct SettingsHelp { /* private fields */ }Expand description
Runtime access to the complete config.toml help catalogue.
Implementations§
Source§impl SettingsHelp
impl SettingsHelp
Sourcepub const fn docs(self) -> &'static [SettingDoc]
pub const fn docs(self) -> &'static [SettingDoc]
Every documented config.toml key.
Sourcepub const fn config_path_precedence(self) -> &'static [&'static str]
pub const fn config_path_precedence(self) -> &'static [&'static str]
Config-file discovery order, from highest to lowest precedence.
Sourcepub fn unknown_in(self, table: &Table) -> Vec<SettingWarning>
pub fn unknown_in(self, table: &Table) -> Vec<SettingWarning>
Reports every section and key in table that no surface claims.
The catalogue is the authority rather than the parser’s own key lists,
and it has to be: [maintenance].batch_size belongs to the CLI and
[server].workers to the MCP server, so a check that only knew what the
shared loader parses would warn about both on every run.
Allocation-free in the ordinary case — a clean config returns an empty
Vec, which allocates nothing. Only a real mistake costs anything.
Sourcepub fn render_config_example(self, set: bool) -> String
pub fn render_config_example(self, set: bool) -> String
Renders config.example.toml: every supported key, with its default,
its type and one line about what it does.
Generated rather than written, because a hand-kept example is another copy of the catalogue that ages without anyone noticing — which is exactly what happened to the four README samples this replaces. A test compares the committed file with this output, so the two cannot drift.
Every line is commented out. An example that sets forty keys
explicitly freezes today’s defaults into the config of everyone who
copies it: a later release improves flat_to_hnsw and they never see
it. Uncomment the two or three you actually mean to change.
set renders the same file with every key active, which is what the
test parses through the real loader — an example nothing can parse is
worth less than no example.
Sourcepub fn render_human(self) -> String
pub fn render_human(self) -> String
Render the catalogue for a terminal or a human-facing tool response.
Trait Implementations§
Source§impl Clone for SettingsHelp
impl Clone for SettingsHelp
Source§fn clone(&self) -> SettingsHelp
fn clone(&self) -> SettingsHelp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more