Skip to main content

SECTIONS

Constant SECTIONS 

Source
pub const SECTIONS: [&'static str; 10];
Expand description

The sections a help_template may name.

A closed vocabulary on purpose. The alternative — handing a template the metadata tree and letting it lay a page out — makes this renderer’s internals public API and asks every implementation of the spec to expose its help model. Implementations agree only on these boundaries and the small colour-tag vocabulary, not on the metadata behind a section.

What each one holds:

sectioncontent
aboutbefore_help, the version banner, and the description
usagethe Usage: synopsis, however many lines it takes
commandsthe subcommand list, or the flattened bodies under flatten_help
argsevery argument group, each under its heading
flagsthis command’s flag groups, then the globals it inherits
grouped_argsarguments with a declared help heading
ungrouped_argsarguments under the default Arguments heading
grouped_flagsflags with a declared help heading
ungrouped_flagsflags under Flags, plus inherited global flags
after_helpexamples, after_help, and the author/license footer on a long page