Struct xplm::command::OwnedCommand
source · pub struct OwnedCommand { /* private fields */ }
Expand description
A command created by this plugin that can be triggered by other components
Implementations§
source§impl OwnedCommand
impl OwnedCommand
sourcepub fn new<H: CommandHandler>(
name: &str,
description: &str,
handler: H
) -> Result<Self, CommandCreateError>
pub fn new<H: CommandHandler>( name: &str, description: &str, handler: H ) -> Result<Self, CommandCreateError>
Creates a new command with a provided name and description, or finds an existing command
In either case, the command will trigger the provided handler.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OwnedCommand
impl !RefUnwindSafe for OwnedCommand
impl !Send for OwnedCommand
impl !Sync for OwnedCommand
impl Unpin for OwnedCommand
impl !UnwindSafe for OwnedCommand
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