rs-eda 0.1.2

rust EDA event-driven framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde_json::Value;

use crate::engine::Engine;

pub trait StrategyOptions {
    /**策略名字 */
    fn name(&self) -> &str;
    /**策略的条件,条件为插件名字 */
    fn condition(&self) -> Vec<&str>;
    /**获取策略数据 */
    fn get_data(&self) -> Option<Value>;
    /**执行策略的方法 */
    fn exec(&self, engine: &mut Engine);
    /**回滚策略的方法 */
    fn rollback(&mut self, engine: &mut Engine);
}