Skip to main content

render_topic

Function render_topic 

Source
pub fn render_topic(
    spec: &Spec<'_>,
    cmd: &Command<'_>,
    topic: &str,
    long: bool,
) -> Option<String>
Expand description

Render one addressable help topic by its Topic::id or visible title.

The result contains the heading and its visible entries, independent of the page’s help_template. This makes a topic suitable for tool help configuration, an editor panel, or an interactive picker without making the group a fake subcommand.