Trait Model
elephantry
pub trait Model<'a> { type Entity: Entity; type Structure: Structure; fn new(connection: &'a Connection) -> Self; fn default_projection() -> Projection { ... } fn create_projection() -> Projection { ... } fn create_entity(tuple: &Tuple) -> Self::Entity { ... } fn primary_key(entity: &Self::Entity) -> HashMap<&'static str, &dyn ToSql> { ... } }
type Entity: Entity
type Structure: Structure
fn new(connection: &'a Connection) -> Self
fn default_projection() -> Projection
fn create_projection() -> Projection
fn create_entity(tuple: &Tuple) -> Self::Entity
fn primary_key(entity: &Self::Entity) -> HashMap<&'static str, &dyn ToSql>