pub struct Command {
pub info: CommandInfo,
pub args: Vec<Arg>,
pub subcommands: Vec<Command>,
pub hooks: Hooks,
}Fields§
§info: CommandInfo§args: Vec<Arg>§subcommands: Vec<Command>§hooks: HooksImplementations§
Source§impl Command
impl Command
pub fn alias(self, alias: impl Into<String>) -> Self
pub fn aliases(self, aliases: Vec<String>) -> Self
pub fn title(self, title: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
pub fn subcommand(self, command: Command) -> Self
pub fn run(self, f: Box<dyn Fn(&mut dyn Context) -> Result<()>>) -> Self
pub fn pre_run(self, f: Box<dyn Fn(&mut dyn Context) -> Result<()>>) -> Self
pub fn post_run(self, f: Box<dyn Fn(&mut dyn Context) -> Result<()>>) -> Self
Auto Trait Implementations§
impl Freeze for Command
impl !RefUnwindSafe for Command
impl !Send for Command
impl !Sync for Command
impl Unpin for Command
impl !UnwindSafe for Command
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