pub struct CommandSpec { /* private fields */ }Implementations§
Source§impl CommandSpec
impl CommandSpec
pub fn new(name: impl Into<String>) -> Self
pub fn alias(self, alias: impl Into<String>) -> Self
pub fn about(self, about: impl Into<String>) -> Self
pub fn command(self, command: CommandSpec) -> Self
pub fn option(self, option: OptionSpec) -> Self
pub fn argument(self, argument: ArgumentSpec) -> Self
pub fn command_required(self, required: bool) -> Self
pub fn name(&self) -> &str
pub fn aliases(&self) -> &[String]
pub fn matches(&self, value: &str) -> bool
pub fn about_text(&self) -> &str
pub fn commands(&self) -> &[CommandSpec]
pub fn options(&self) -> &[OptionSpec]
pub fn arguments(&self) -> &[ArgumentSpec]
pub fn is_command_required(&self) -> bool
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
impl Eq for CommandSpec
Source§impl PartialEq for CommandSpec
impl PartialEq 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