pub struct ClapCommand {
pub name: String,
pub about: Option<String>,
pub long_about: Option<String>,
pub version: Option<String>,
pub args: Vec<ClapArg>,
pub subcommands: Vec<ClapCommand>,
}Expand description
A command or subcommand in the schema.
Fields§
§name: String§about: Option<String>§long_about: Option<String>§version: Option<String>§args: Vec<ClapArg>§subcommands: Vec<ClapCommand>Implementations§
Source§impl ClapCommand
impl ClapCommand
Sourcepub fn all_commands(&self) -> Vec<&ClapCommand>
pub fn all_commands(&self) -> Vec<&ClapCommand>
Returns this command and all subcommands in depth-first order.
Trait Implementations§
Source§impl Clone for ClapCommand
impl Clone for ClapCommand
Source§fn clone(&self) -> ClapCommand
fn clone(&self) -> ClapCommand
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 ClapCommand
impl Debug for ClapCommand
Source§impl<'de> Deserialize<'de> for ClapCommand
impl<'de> Deserialize<'de> for ClapCommand
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 ClapCommand
impl RefUnwindSafe for ClapCommand
impl Send for ClapCommand
impl Sync for ClapCommand
impl Unpin for ClapCommand
impl UnsafeUnpin for ClapCommand
impl UnwindSafe for ClapCommand
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