pub struct CommandSpec {
pub name: CommandName,
pub signature: &'static str,
pub aliases: &'static [&'static str],
pub description: &'static str,
pub usage: Option<&'static str>,
pub allow_unknown_options: bool,
pub args: &'static [CommandArgumentSpec],
pub options: &'static [CommandOptionSpec],
}Expand description
Data-only descriptor for an upstream CLI command.
Fields§
§name: CommandName§signature: &'static str§aliases: &'static [&'static str]§description: &'static str§usage: Option<&'static str>§allow_unknown_options: bool§args: &'static [CommandArgumentSpec]§options: &'static [CommandOptionSpec]Implementations§
Source§impl CommandSpec
impl CommandSpec
pub fn option(self, long: &str) -> Option<&'static CommandOptionSpec>
Trait Implementations§
Source§impl Clone for CommandSpec
impl Clone for CommandSpec
Source§fn clone(&self) -> CommandSpec
fn clone(&self) -> CommandSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandSpec
impl Debug for CommandSpec
Source§impl PartialEq for CommandSpec
impl PartialEq for CommandSpec
Source§fn eq(&self, other: &CommandSpec) -> bool
fn eq(&self, other: &CommandSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CommandSpec
impl Eq for CommandSpec
impl StructuralPartialEq for CommandSpec
Auto Trait Implementations§
impl Freeze for CommandSpec
impl RefUnwindSafe for CommandSpec
impl Send for CommandSpec
impl Sync for CommandSpec
impl Unpin for CommandSpec
impl UnsafeUnpin for CommandSpec
impl UnwindSafe for CommandSpec
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.