Trait mysql_connector::model::Model

source ·
pub trait Model: ModelData + HasActiveModel {
    type Primary;

    const PRIMARY: &'static str;

    // Required method
    fn primary(&self) -> Value;

    // Provided methods
    fn active_model() -> <Self as HasActiveModel>::ActiveModel { ... }
    fn update_model(&self) -> UpdateModel<Self> { ... }
}

Required Associated Types§

Required Associated Constants§

source

const PRIMARY: &'static str

Required Methods§

source

fn primary(&self) -> Value

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§