pub struct ActionMetadata {
pub regex_str: &'static str,
pub priority: i32,
pub description: &'static str,
pub sync: bool,
pub by_ref: bool,
pub func: fn(*const ()),
}Expand description
Action 元数据(编译期可用)
这个结构体只包含简单的数据,可以在编译期初始化
Fields§
§regex_str: &'static str正则表达式字符串(编译期常量)
priority: i32优先级,数值越大优先级越高
description: &'static str可选的描述信息
sync: bool是否启用全局同步模式
by_ref: bool是否使用引用传递(避免大事件拷贝)
func: fn(*const ())函数指针(类型擦除)
Trait Implementations§
impl Collect for ActionMetadata
Auto Trait Implementations§
impl Freeze for ActionMetadata
impl RefUnwindSafe for ActionMetadata
impl Send for ActionMetadata
impl Sync for ActionMetadata
impl Unpin for ActionMetadata
impl UnwindSafe for ActionMetadata
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