pub trait BaseController:
Send
+ Sync
+ 'static {
// Required methods
fn option(&self) -> &ControllerOption;
fn table_name(&self) -> &str;
fn db(&self) -> &DatabaseConnection;
}Expand description
控制器基类 trait
提供通用的 CRUD 接口处理
Required Methods§
Sourcefn option(&self) -> &ControllerOption
fn option(&self) -> &ControllerOption
获取控制器配置
Sourcefn table_name(&self) -> &str
fn table_name(&self) -> &str
获取表名
Sourcefn db(&self) -> &DatabaseConnection
fn db(&self) -> &DatabaseConnection
获取数据库连接
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".