Trait df_plugin::Action

source ·
pub trait Action {
Show 17 methods // Required methods fn title(&mut self) -> &'static str; fn name(&mut self) -> &'static str; fn index(&mut self, header: JsonValue, request: JsonValue) -> Response; // Provided methods fn token(&mut self) -> bool { ... } fn describe(&mut self) -> &'static str { ... } fn public(&mut self) -> bool { ... } fn interface_type(&mut self) -> &'static str { ... } fn dependent(&mut self) -> Vec<&'static str> { ... } fn params(&mut self) -> JsonValue { ... } fn _check(&mut self, request: JsonValue) -> (bool, String, JsonValue) { ... } fn run(&mut self, header: JsonValue, request: JsonValue) -> Response { ... } fn success(&mut self, data: JsonValue, msg: &str) -> Response { ... } fn fail(&mut self, msg: &str) -> Response { ... } fn login(&mut self, msg: &str) -> Response { ... } fn download(&mut self, filename: &str) -> Response { ... } fn redirect(&mut self, url: &str) -> Response { ... } fn tools(&mut self) -> Tools { ... }
}
Expand description

动作

Required Methods§

source

fn title(&mut self) -> &'static str

标题

source

fn name(&mut self) -> &'static str

api名称

source

fn index(&mut self, header: JsonValue, request: JsonValue) -> Response

Provided Methods§

source

fn token(&mut self) -> bool

是否使用密钥

source

fn describe(&mut self) -> &'static str

API描述

source

fn public(&mut self) -> bool

是否公开

source

fn interface_type(&mut self) -> &'static str

接口类型 btn menu

source

fn dependent(&mut self) -> Vec<&'static str>

依赖接口

source

fn params(&mut self) -> JsonValue

请求参数入口

source

fn _check(&mut self, request: JsonValue) -> (bool, String, JsonValue)

检测

source

fn run(&mut self, header: JsonValue, request: JsonValue) -> Response

执行参数入口

source

fn success(&mut self, data: JsonValue, msg: &str) -> Response

source

fn fail(&mut self, msg: &str) -> Response

source

fn login(&mut self, msg: &str) -> Response

source

fn download(&mut self, filename: &str) -> Response

source

fn redirect(&mut self, url: &str) -> Response

source

fn tools(&mut self) -> Tools

获取工具集合

Implementors§