pub struct SubcommandSpec {
pub name: String,
pub description: Option<String>,
pub full_path: String,
pub parent: Option<String>,
pub options: Vec<OptionSpec>,
pub arguments: Vec<ArgumentSpec>,
pub subcommands: Vec<SubcommandSpec>,
}Expand description
Structured description of a subcommand (very heuristic).
Fields§
§name: StringThe subcommand name, e.g. “build”, “run”.
description: Option<String>A brief description, if available.
full_path: StringFull path to this subcommand, e.g. “docker container run”.
parent: Option<String>Parent subcommand name, if this is nested (e.g. “container” for “run”).
options: Vec<OptionSpec>Subcommand-specific options.
arguments: Vec<ArgumentSpec>Subcommand-specific arguments.
subcommands: Vec<SubcommandSpec>Nested subcommands (recursive structure).
Trait Implementations§
Source§impl Clone for SubcommandSpec
impl Clone for SubcommandSpec
Source§fn clone(&self) -> SubcommandSpec
fn clone(&self) -> SubcommandSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubcommandSpec
impl Debug for SubcommandSpec
Source§impl<'de> Deserialize<'de> for SubcommandSpec
impl<'de> Deserialize<'de> for SubcommandSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SubcommandSpec
impl RefUnwindSafe for SubcommandSpec
impl Send for SubcommandSpec
impl Sync for SubcommandSpec
impl Unpin for SubcommandSpec
impl UnwindSafe for SubcommandSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more