Skip to main content

Entity

Trait Entity 

Source
pub trait Entity:
    for<'r> FromRow<'r, PgRow>
    + Send
    + Sync
    + Unpin
    + 'static {
    type Id: EntityId;

    const TABLE: &'static str;
    const COLUMNS: &'static str;
    const ID_COLUMN: &'static str;

    // Required method
    fn id(&self) -> &Self::Id;
}

Required Associated Constants§

Source

const TABLE: &'static str

Source

const COLUMNS: &'static str

Source

const ID_COLUMN: &'static str

Required Associated Types§

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§