Skip to main content

FromRusqliteRow

Trait FromRusqliteRow 

Source
pub trait FromRusqliteRow: Sized {
    // Required method
    fn from_rusqlite_row(row: &Row<'_>) -> Result<Self, Error>;
}
Expand description

Decode a model from a rusqlite row.

Implementations are free to use either positional (row.get(0)) or named (row.get("col")) lookups. The codegen uses named lookups against the model’s rust_name aliases, matching the projection produced by cratestack_sql::ModelDescriptor::select_projection.

Required Methods§

Source

fn from_rusqlite_row(row: &Row<'_>) -> Result<Self, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§