Trait df_plugin::Action

source ·
pub trait Action {
    // 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 public(&mut self) -> bool { ... }
    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 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 public(&mut self) -> bool

是否公开

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 tools(&mut self) -> Tools

获取工具集合

Implementors§

source§

impl Action for df_plugin::dict::flow::add::Add

source§

impl Action for df_plugin::dict::flow::delete::Delete

source§

impl Action for df_plugin::dict::flow::disable::Disable

source§

impl Action for df_plugin::dict::flow::edit::Edit

source§

impl Action for df_plugin::dict::flow::enable::Enable

source§

impl Action for df_plugin::dict::flow::select::Select

source§

impl Action for df_plugin::dict::flow::table::Table

source§

impl Action for df_plugin::dict::tranmode::add::Add

source§

impl Action for df_plugin::dict::tranmode::delete::Delete

source§

impl Action for df_plugin::dict::tranmode::disable::Disable

source§

impl Action for df_plugin::dict::tranmode::edit::Edit

source§

impl Action for df_plugin::dict::tranmode::enable::Enable

source§

impl Action for df_plugin::dict::tranmode::select::Select

source§

impl Action for df_plugin::dict::tranmode::table::Table

source§

impl Action for df_plugin::file::file::add::Add

source§

impl Action for df_plugin::file::file::delete::Delete

source§

impl Action for df_plugin::file::file::select::Select

source§

impl Action for df_plugin::file::file::table::Table

source§

impl Action for df_plugin::tests::test::table::Table

source§

impl Action for TestAction