Crate action_dispatch_macro

Crate action_dispatch_macro 

Source
Expand description

§Action Dispatch Macro

过程宏实现模块,提供 #[action(...)] 属性宏

§功能

解析注解参数:

  • regex: 正则表达式(必需)
  • priority: 优先级(可选,默认 0)
  • description: 描述信息(可选,默认空字符串)
  • sync: 是否全局同步(可选,默认 false)

生成注册代码,使用 inventory 在编译期收集所有 handler

Attribute Macros§

action
#[action(…)] 属性宏