pub trait Action {
Show 32 methods
// Required methods
fn title(&self) -> &'static str;
fn index(&mut self, request: Request) -> ApiResponse;
// Provided methods
fn _name(&self) -> String { ... }
fn api(&self) -> String { ... }
fn token(&self) -> bool { ... }
fn version(&self) -> &'static str { ... }
fn author(&self) -> &'static str { ... }
fn sort(&self) -> usize { ... }
fn description(&self) -> &'static str { ... }
fn path(&self) -> &'static str { ... }
fn query(&self) -> JsonValue { ... }
fn tags(&self) -> &'static [&'static str] { ... }
fn icon(&self) -> &'static str { ... }
fn public(&self) -> bool { ... }
fn auth(&mut self) -> bool { ... }
fn interface_type(&mut self) -> InterfaceType { ... }
fn method(&mut self) -> Method { ... }
fn content_type(&mut self) -> ContentType { ... }
fn params(&mut self) -> JsonValue { ... }
fn success(&mut self) -> ApiResponse { ... }
fn error(&mut self) -> ApiResponse { ... }
fn run(&mut self, request: Request) -> Result<ApiResponse, ApiResponse> { ... }
fn check(
&mut self,
request: &mut JsonValue,
params: JsonValue,
) -> Result<(), ApiResponse> { ... }
fn params_table_select(&mut self, params: JsonValue) -> JsonValue { ... }
fn params_table_menu(&mut self, params: JsonValue) -> JsonValue { ... }
fn params_table_tree(&mut self, params: JsonValue) -> JsonValue { ... }
fn params_table_list(&mut self, params: JsonValue) -> JsonValue { ... }
fn table_column(&mut self, field: JsonValue) -> JsonValue { ... }
fn filter_column(&mut self, field: JsonValue) -> JsonValue { ... }
fn tools(&mut self) -> Tools { ... }
fn config(&mut self, name: &str) -> JsonValue { ... }
fn btn(&mut self) -> Btn { ... }
}Expand description
功能接口
Required Methods§
Sourcefn index(&mut self, request: Request) -> ApiResponse
fn index(&mut self, request: Request) -> ApiResponse
内部入口
Provided Methods§
作者
fn sort(&self) -> usize
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
功能描述
归属标签
fn icon(&self) -> &'static str
Sourcefn interface_type(&mut self) -> InterfaceType
fn interface_type(&mut self) -> InterfaceType
接口类型 btn api menu
Sourcefn content_type(&mut self) -> ContentType
fn content_type(&mut self) -> ContentType
请求类型
Sourcefn success(&mut self) -> ApiResponse
fn success(&mut self) -> ApiResponse
成功响应
Sourcefn error(&mut self) -> ApiResponse
fn error(&mut self) -> ApiResponse
失败响应
Sourcefn run(&mut self, request: Request) -> Result<ApiResponse, ApiResponse>
fn run(&mut self, request: Request) -> Result<ApiResponse, ApiResponse>
外部入口
Sourcefn check(
&mut self,
request: &mut JsonValue,
params: JsonValue,
) -> Result<(), ApiResponse>
fn check( &mut self, request: &mut JsonValue, params: JsonValue, ) -> Result<(), ApiResponse>
入参验证
fn params_table_select(&mut self, params: JsonValue) -> JsonValue
菜单表格接收参数
Sourcefn params_table_tree(&mut self, params: JsonValue) -> JsonValue
fn params_table_tree(&mut self, params: JsonValue) -> JsonValue
树型表格接收参数
Sourcefn params_table_list(&mut self, params: JsonValue) -> JsonValue
fn params_table_list(&mut self, params: JsonValue) -> JsonValue
表格接收参数