Trait diesel::associations::HasTable

source ·
pub trait HasTable {
    type Table: Table;

    // Required method
    fn table() -> Self::Table;
}
Expand description

This trait indicates that a struct is associated with a single database table.

This trait is implemented by structs which implement Identifiable, as well as database tables themselves.

Required Associated Types§

source

type Table: Table

The table this type is associated with.

Required Methods§

source

fn table() -> Self::Table

Returns the table this type is associated with.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: HasTable> HasTable for &'a T

source§

type Table = <T as HasTable>::Table

source§

fn table() -> Self::Table

Implementors§