pub trait FromPartialPgRow: Sized {
// Required method
fn decode_partial_pg_row(
row: &PgRow,
selected: &[&str],
) -> Result<Self, Error>;
}Expand description
Companion to sqlx::FromRow that decodes a row projected by
.select(...) — i.e. a row where only the named columns are
present in the SQL SELECT list. Non-selected fields populate to
their type’s Default::default() value.
The macro emits this impl for every generated model struct, so the
trait is invisible to schema authors at the call site; it shows up
as the bound on the typed builder’s T generic.
Required Methods§
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.