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 a tuple
If you see an error message mentioning this trait you are likely trying to map the result of a query to a 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
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.