pub struct Command {
pub name: String,
pub description: String,
pub handler: Handler,
}Fields§
§name: String§description: String§handler: HandlerImplementations§
Source§impl Command
impl Command
Sourcepub fn native(
name: impl Into<String>,
description: impl Into<String>,
handler: CommandFn,
) -> Self
pub fn native( name: impl Into<String>, description: impl Into<String>, handler: CommandFn, ) -> Self
A built-in command backed by a compiled-in Rust fn.
Sourcepub fn action(
name: impl Into<String>,
description: impl Into<String>,
action: impl Into<String>,
) -> Self
pub fn action( name: impl Into<String>, description: impl Into<String>, action: impl Into<String>, ) -> Self
A Lisp-authored command whose behavior is a dotted action
symbol resolved at run time. Mirrors (defcmd :name … :action "buffer.write-all").
pub fn blue( name: impl Into<String>, description: impl Into<String>, function: impl Into<String>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin 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