Skip to main content

SettingsHelp

Struct SettingsHelp 

Source
pub struct SettingsHelp { /* private fields */ }
Expand description

Runtime access to the complete config.toml help catalogue.

Implementations§

Source§

impl SettingsHelp

Source

pub const fn docs(self) -> &'static [SettingDoc]

Every documented config.toml key.

Source

pub const fn config_path_precedence(self) -> &'static [&'static str]

Config-file discovery order, from highest to lowest precedence.

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> SettingsHelp

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SettingsHelp

Source§

impl Debug for SettingsHelp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.