macro_rules! register {
( $($rest:tt)* ) => { ... };
}Expand description
生成 plugin_alloc / plugin_free / plugin_dispatch 三个 ABI 导出(spec §6.1/§6.2)。
可挂载(任意顺序、可组合):
before_save:fn(Note) -> Result<Note, String>storage:implstorage::Storage的类型command:fn(&str /* 命令 id */, Value /* args */) -> Result<Value, PluginError>ui:fn(&str /* view */, Value /* state */) -> Result<Value, PluginError>(返回 UiNode 树,spec §9.3)