pub trait Table {
    fn from_row(row: &Row<'_>) -> Result<Self>
    where
        Self: Sized
; fn get(db: &Connection) -> Statement<'_>; fn extract(
        item: Result<Result<Self, Error>, Error>
    ) -> Result<Self, TableError>
    where
        Self: Sized
; }
Expand description

Defines behavior for SQL Table data

Required Methods§

Serializes a single row of data to an instance of the struct that implements this Trait

Gets a statment we can exectue to iterate over the data in the table

Extract valid row data while handling both types of query errors

Implementors§