Struct usage::parse::cmd::SpecCommand
source · pub struct SpecCommand {Show 19 fields
pub full_cmd: Vec<String>,
pub usage: String,
pub subcommands: IndexMap<String, SpecCommand>,
pub args: Vec<SpecArg>,
pub flags: Vec<SpecFlag>,
pub deprecated: Option<String>,
pub hide: bool,
pub subcommand_required: bool,
pub help: Option<String>,
pub long_help: Option<String>,
pub name: String,
pub aliases: Vec<String>,
pub hidden_aliases: Vec<String>,
pub before_help: Option<String>,
pub before_long_help: Option<String>,
pub after_help: Option<String>,
pub after_long_help: Option<String>,
pub examples: Vec<SpecExample>,
pub subcommand_lookup: OnceLock<HashMap<String, String>>,
}
Fields§
§full_cmd: Vec<String>
§usage: String
§subcommands: IndexMap<String, SpecCommand>
§args: Vec<SpecArg>
§flags: Vec<SpecFlag>
§deprecated: Option<String>
§hide: bool
§subcommand_required: bool
§help: Option<String>
§long_help: Option<String>
§name: String
§aliases: Vec<String>
§before_help: Option<String>
§before_long_help: Option<String>
§after_help: Option<String>
§after_long_help: Option<String>
§examples: Vec<SpecExample>
§subcommand_lookup: OnceLock<HashMap<String, String>>
Implementations§
source§impl SpecCommand
impl SpecCommand
pub fn find_subcommand(&self, name: &str) -> Option<&SpecCommand>
Trait Implementations§
source§impl Clone for SpecCommand
impl Clone for SpecCommand
source§fn clone(&self) -> SpecCommand
fn clone(&self) -> SpecCommand
Returns a copy 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 SpecCommand
impl Debug for SpecCommand
source§impl Default for SpecCommand
impl Default for SpecCommand
source§fn default() -> SpecCommand
fn default() -> SpecCommand
Returns the “default value” for a type. Read more
source§impl From<&Command> for SpecCommand
impl From<&Command> for SpecCommand
source§impl From<&SpecCommand> for KdlNode
impl From<&SpecCommand> for KdlNode
source§fn from(cmd: &SpecCommand) -> Self
fn from(cmd: &SpecCommand) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for SpecCommand
impl Send for SpecCommand
impl Sync for SpecCommand
impl Unpin for SpecCommand
impl UnwindSafe for SpecCommand
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