[][src]Trait elephantry::Model

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> { ... } }

Associated Types

Loading content...

Required methods

fn new(connection: &'a Connection) -> Self

Loading content...

Provided methods

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>

Loading content...

Implementors

Loading content...