pub struct Command {
pub name: String,
pub aliases: Vec<String>,
pub description: Option<String>,
pub filter: ContextFilter,
pub action: CommandAction,
}Expand description
代表一个机器人指令。
Fields§
§name: String指令的主要名称。
aliases: Vec<String>指令的别名列表。
description: Option<String>指令功能的简要描述。
filter: ContextFilter指令注册时关联的上下文过滤器。
action: CommandAction指令执行时的异步动作。
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Command
impl !UnwindSafe for Command
impl Freeze for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin 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