pub struct CliManualNode {
pub path: String,
pub description: Option<String>,
pub input_schema: Value,
pub output_schema: Value,
}Expand description
One node in a CLI “manual”: the reference entry for a single command path.
The manual is the whole-subtree aggregate emitted by the --manual flag.
Each leaf command in the tree contributes one CliManualNode; mount points
contribute the nodes of their subtree (recursively), with the path prefixed.
This is a serializable data structure (not a closure or scraped runtime
state), so the manual caches, transports, and diffs cleanly. The --manual
rendering layer turns a Vec<CliManualNode> into either human-readable text
or a path-keyed JSON object.
Fields§
§path: StringSpace-separated command path from the root of the invoked subtree,
e.g. "edit history list". The root subtree’s own node (if it has a
default action) uses the empty string.
description: Option<String>The command’s description (first paragraph of its doc comment), if any.
input_schema: ValueJSON Schema of the command’s input parameters.
output_schema: ValueJSON Schema of the command’s return type.
Trait Implementations§
Source§impl Clone for CliManualNode
impl Clone for CliManualNode
Source§fn clone(&self) -> CliManualNode
fn clone(&self) -> CliManualNode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more