Trait mysql_connector::model::Model

source ·
pub trait Model: ModelData + HasActiveModel {
    type Primary: Into<Value>;

    const PRIMARY: &'static str;
    const AUTO_INCREMENT: bool;

    // Required method
    fn primary(&self) -> Self::Primary;

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

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn primary(&self) -> Self::Primary

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§