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
动作