rs_eda/plugin/mod.rs
1use crate::engine::Engine;
2use serde_json::Value;
3
4pub trait PluginOptions {
5 /**插件的名字 */
6 fn name(&self) -> &str;
7 /**插件的依赖,依赖值为插件名字 */
8 fn deps(&self) -> Vec<&str>;
9 /**获取插件数据 */
10 fn get_data(&self) -> Option<Value>;
11 /**插件的安装方法 */
12 fn install(&mut self, engine: &mut Engine);
13 /**插件的销毁方法 */
14 fn dispose(&mut self, engine: &mut Engine);
15}