Trait diesel::deserialize::FromStaticSqlRow
source · pub trait FromStaticSqlRow<ST, DB: Backend>: Sized {
// Required method
fn build_from_row<'a>(row: &impl Row<'a, DB>) -> Result<Self>;
}
Expand description
A helper trait to deserialize a statically sized row into an tuple
If you see an error message mentioning this trait you likely trying to map the result of an query to an struct with mismatching field types. Recheck your field order and the concrete field types
You should not need to implement this trait directly.
Diesel provides wild card implementations for any supported tuple size
and for any type that implements FromSql<ST, DB>
.
Required Methods§
sourcefn build_from_row<'a>(row: &impl Row<'a, DB>) -> Result<Self>
fn build_from_row<'a>(row: &impl Row<'a, DB>) -> Result<Self>
See the trait documentation