pub struct SpecCommand {Show 22 fields
pub full_cmd: Vec<String>,
pub usage: String,
pub subcommands: IndexMap<String, SpecCommand>,
pub args: Vec<SpecArg>,
pub flags: Vec<SpecFlag>,
pub mounts: Vec<SpecMount>,
pub deprecated: Option<String>,
pub hide: bool,
pub subcommand_required: bool,
pub help: Option<String>,
pub help_long: Option<String>,
pub help_md: Option<String>,
pub name: String,
pub aliases: Vec<String>,
pub hidden_aliases: Vec<String>,
pub before_help: Option<String>,
pub before_help_long: Option<String>,
pub before_help_md: Option<String>,
pub after_help: Option<String>,
pub after_help_long: Option<String>,
pub after_help_md: Option<String>,
pub examples: Vec<SpecExample>,
/* private fields */
}
Fields§
§full_cmd: Vec<String>
§usage: String
§subcommands: IndexMap<String, SpecCommand>
§args: Vec<SpecArg>
§flags: Vec<SpecFlag>
§mounts: Vec<SpecMount>
§deprecated: Option<String>
§hide: bool
§subcommand_required: bool
§help: Option<String>
§help_long: Option<String>
§help_md: Option<String>
§name: String
§aliases: Vec<String>
§before_help: Option<String>
§before_help_long: Option<String>
§before_help_md: Option<String>
§after_help: Option<String>
§after_help_long: Option<String>
§after_help_md: Option<String>
§examples: Vec<SpecExample>
Implementations§
Source§impl SpecCommand
impl SpecCommand
pub fn usage(&self) -> String
pub fn all_subcommands(&self) -> Vec<&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§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 !Freeze for SpecCommand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more