pub trait FromSql: Sized {
// Required method
fn from_sql(row: &ResultRow<'_, '_>, col: ColIx) -> SqliteResult<Self>;
}
Expand description
A trait for result values from a query.
inspired by sfackler’s FromSql (and some haskell bindings?)
- TODO: many more implementors, including Option
Required Methods§
Sourcefn from_sql(row: &ResultRow<'_, '_>, col: ColIx) -> SqliteResult<Self>
fn from_sql(row: &ResultRow<'_, '_>, col: ColIx) -> SqliteResult<Self>
Try to extract a Self
type value from the col
th colum of a ResultRow
.
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.