pub struct PluginCommand {
pub trigger: String,
pub title: String,
pub extended: bool,
}Expand description
一条脚本插件指令(/ 模式):插件在清单里声明的触发词和标题。宿主把会运行的插件声明的指令按执行顺序交给引擎,引擎按 local::command::usable_plugin_commands 决定哪些生效(用户指令表赢、插件先到先得),不照单全收。
Fields§
§trigger: String2..=16 个小写 ASCII 字母,即 / 之后输入的触发词。
title: String1..=8 个字符,由 runtime 画在插件注释格里,不进引擎的注释。
extended: bool清单里写了 arguments = "extended":完整打出触发词之后,参数除了小写字母还收数字和 crate::local::command::EXTENDED_ARGUMENT_SYMBOLS,这时宿主把数字当输入、不当选词键(见 InputSession::spelling_symbols)。
Trait Implementations§
Source§impl Clone for PluginCommand
impl Clone for PluginCommand
Source§impl Debug for PluginCommand
impl Debug for PluginCommand
impl Eq for PluginCommand
Source§impl PartialEq for PluginCommand
impl PartialEq for PluginCommand
impl StructuralPartialEq for PluginCommand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.