Skip to main content

section_help

Function section_help 

Source
pub fn section_help(key: &str) -> &'static str
Expand description

Help blurb for a section key, covering both Section variants and the long tail of top-level Config fields the dashboard / TUI config editor surface (gateway, scheduler, observability, …). Single source of truth shared by every surface — the gateway sidebar, the CLI onboard flow, and the future TUI config editor all call this rather than maintaining parallel tables.

Resolution order:

  1. Section variants (curated help text next to the variant declaration in the sections! macro).
  2. The Config struct’s #[nested] field-level /// docstring, harvested by the Configurable derive into Config::nested_section_help. This is what makes adding a new top-level section a one-line schema change with no parallel help table to update.

Returns "" for keys without a docstring so callers can decide whether to omit the help row or show a fallback.