artisan 0.10.0

Api RequesT Framework U Like - 你喜欢的 Rust API 请求框架
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! 快捷方式 trait 定义
//!
//! 定义插件组合的快捷方式接口。
//!
//! 用于简化多个 API 使用相同插件组合的场景。

use std::collections::HashMap;
use std::sync::Arc;

use serde_json::Value;

use crate::plugin::Plugin;

/// 快捷方式 trait
pub trait Shortcut: Default {
    /// 返回插件列表
    fn get_plugins(&self, params: &HashMap<String, Value>) -> Vec<Arc<dyn Plugin>>;
}