Expand description
Human-readable and Markdown renderers for commands.
This module exposes three rendering functions and one disambiguation helper:
-
render_help— produces a multi-section plain-text help page (NAME, SUMMARY, DESCRIPTION, USAGE, ARGUMENTS, FLAGS, SUBCOMMANDS, EXAMPLES, BEST PRACTICES, ANTI-PATTERNS). Sections that have no content are omitted. -
render_subcommand_list— produces a compact two-column listing ofcanonical summarylines, suitable for a top-level--helpdisplay. -
render_markdown— produces a GitHub-flavored Markdown page with##headings, argument/flag tables, and fenced code blocks for examples. -
render_ambiguity— formats a human-readable message when a command token is ambiguous. -
render_docs— produces a full Markdown reference document for all commands in acrate::query::Registry, with a table of contents and per-command sections separated by---.
None of the functions print to stdout/stderr directly; all return a
String that the caller can write wherever appropriate.
Structs§
- Default
Renderer - The default renderer. Delegates to the module-level free functions.
Enums§
- Shell
- A supported shell for completion script generation.
Traits§
- Renderer
- A pluggable renderer for command help, Markdown docs, and disambiguation messages.
Functions§
- render_
ambiguity - Render a human-readable disambiguation message.
- render_
completion - Generate a shell completion script for a registry of commands.
- render_
docs - Render a full Markdown reference document for all commands in a registry.
- render_
help - Render a human-readable help page for a command.
- render_
json_ schema - Generate a JSON Schema (draft-07) describing the inputs for a command.
- render_
markdown - Render a Markdown documentation page for a command.
- render_
resolve_ error - Render any
crate::ResolveErroras a human-readable string. - render_
subcommand_ list - Render a compact listing of multiple commands (e.g. for a top-level help).