pub trait DbBmc {
type Error;
type IdType: IdType;
const ENTITY: &'static str;
const TABLE: &'static str;
// Required method
fn id_column() -> DynIden;
// Provided methods
fn id_to_value(id: &Self::IdType) -> SimpleExpr { ... }
fn get_table_ref() -> TableRef { ... }
}Expand description
The core trait that defines a type that acts as a database model controller.
While not necessary for types to implement this to interact with the db, it acts as a useful standardization for most models that have primary keys.
Required Associated Constants§
Required Associated Types§
Required Methods§
Provided Methods§
fn id_to_value(id: &Self::IdType) -> SimpleExpr
fn get_table_ref() -> TableRef
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.