pub struct NodeSnapshot {Show 18 fields
pub name: String,
pub aliases: Vec<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub usage: Vec<String>,
pub positionals: Vec<PositionalSnapshot>,
pub flags: Vec<FlagSnapshot>,
pub examples: Vec<ExampleSnapshot>,
pub group: Option<String>,
pub deprecated: Option<String>,
pub detected_framework: Option<String>,
pub provenance: ProvenanceSnapshot,
pub hidden: bool,
pub children_filled: bool,
pub heading_attested: bool,
pub unparsed: Vec<String>,
pub subcommands: Vec<NodeSnapshot>,
pub confession: Option<ConfessionSnapshot>,
}Expand description
Snapshot form of CommandNode. See this module’s doc comment for the
normalization rules; in short, Option/Vec fields are omitted when
empty, provenance.confidence is rounded, and subcommands order is
preserved exactly as CommandNode stored it.
Fields§
§name: StringThe command’s own name, e.g. "rebase" (not the full path).
aliases: Vec<String>Alternate names this command is also invoked as.
summary: Option<String>A one-line hint.
description: Option<String>Long-form prose.
usage: Vec<String>Raw usage patterns, kept verbatim.
positionals: Vec<PositionalSnapshot>Positional arguments.
flags: Vec<FlagSnapshot>This node’s own flags.
examples: Vec<ExampleSnapshot>Worked examples.
group: Option<String>Display grouping from the source.
deprecated: Option<String>The deprecation reason, when deprecated.
detected_framework: Option<String>The framework Tier A′ identified for this node, if any.
provenance: ProvenanceSnapshotWhich source(s) contributed this node’s own fields.
True if this command should be hidden from the tree by default.
children_filled: boolTrue when this node’s subcommands list is known-complete.
heading_attested: boolTrue when this node was recovered from a bare-word block under a recognized command heading (spec §7 Tier B rule 1) rather than conjured from layout alone.
unparsed: Vec<String>The tool’s raw --help output, one line per entry, set only when no
parse produced anything structurally plausible.
subcommands: Vec<NodeSnapshot>Direct subcommands, in exactly the order CommandNode stored them —
never reordered. See this module’s doc comment.
confession: Option<ConfessionSnapshot>What this node’s own --help text said about being an incomplete
document, if anything (spec §6 rule 2b). Omitted entirely for the
overwhelmingly common case, no confession printed at all.
Trait Implementations§
Source§impl Clone for NodeSnapshot
impl Clone for NodeSnapshot
Source§fn clone(&self) -> NodeSnapshot
fn clone(&self) -> NodeSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more