Skip to main content

Model

Trait Model 

Source
pub trait Model: Sized {
    type Table: Table;
    type PrimaryKeyType: Copy;
    type InsertType;

    // Required methods
    fn table() -> Self::Table;
    fn id(&self) -> Self::PrimaryKeyType;
}

Required Associated Types§

Required Methods§

Source

fn table() -> Self::Table

Source

fn id(&self) -> Self::PrimaryKeyType

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§