FromSqlRow

Trait FromSqlRow 

Source
pub trait FromSqlRow<ST, DB: Backend>: Sized {
    // Required method
    fn build_from_row<'a>(row: &impl Row<'a, DB>) -> Result<Self>;
}
Expand description

Deserialize a database row into a rust data structure

Diesel provides wild card implementations of this trait for all types that implement one of the following traits:

Required Methods§

Source

fn build_from_row<'a>(row: &impl Row<'a, DB>) -> Result<Self>

See the trait documentation.

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§

Source§

impl<DB, T> FromSqlRow<Untyped, DB> for T
where DB: Backend, T: QueryableByName<DB>,

Source§

impl<T, ST, DB> FromSqlRow<ST, DB> for T
where T: Queryable<ST, DB>, ST: SqlTypeOrSelectable, DB: Backend, T::Row: FromStaticSqlRow<ST, DB>,