Skip to main content

render_syntax_section

Function render_syntax_section 

Source
pub fn render_syntax_section(key: &str) -> Option<String>
Expand description

Render a single Syntax section by its fragment key (e.g. "collections"), or None if no such section exists.

This is what backs help <subsystem> for a syntax feature big enough to want its own topic (help collections) without hand-writing a second, driftable copy of the reference text — single-sourced with render_syntax_reference and content/en/syntax.md. The pattern generalizes to any future subsystem-sized syntax feature: give its syntax_section a memorable key and it’s queryable via help <key> for free.