Trait tusk_rs::query::FromPostgres

source ·
pub trait FromPostgres {
    // Required methods
    fn from_postgres(row: &Row) -> Self;
    fn try_from_postgres(row: &Row) -> Result<Self, FromPostgresError>
       where Self: Sized;
}
Expand description

A trait for getting a struct from a Postgres row.

This can be derived provided that each property also implements FromPostgres.

Required Methods§

source

fn from_postgres(row: &Row) -> Self

source

fn try_from_postgres(row: &Row) -> Result<Self, FromPostgresError>
where Self: Sized,

Object Safety§

This trait is not object safe.

Implementors§