pub struct PluginCommand {
pub name: String,
pub description: String,
pub subcommands: Vec<Self>,
pub handler: Option<CommandHandler>,
}Expand description
A CLI command provided by a plugin.
Commands have a name, description, optional subcommands, and an optional
async handler function. Use PluginCommandBuilder for ergonomic construction.
Fields§
§name: String§description: String§subcommands: Vec<Self>§handler: Option<CommandHandler>Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginCommand
impl !RefUnwindSafe for PluginCommand
impl Send for PluginCommand
impl Sync for PluginCommand
impl Unpin for PluginCommand
impl UnsafeUnpin for PluginCommand
impl !UnwindSafe for PluginCommand
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