pub trait DecodeRow<Row>: Default + Sized {
type Error;
// Required method
fn decode_row(row: &Row) -> Result<Self, Self::Error>;
}
Expand description
A collection of values that can be decoded from a single row.
This trait can be derived by zino_derive::DecodeRow
.
Required Associated Types§
Required Methods§
Sourcefn decode_row(row: &Row) -> Result<Self, Self::Error>
fn decode_row(row: &Row) -> Result<Self, Self::Error>
Decodes a row and attempts to create an instance of Self
.
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.
Implementations on Foreign Types§
Source§impl DecodeRow<SqliteRow> for Map
Available on crate feature orm-sqlx
only.
impl DecodeRow<SqliteRow> for Map
Available on crate feature
orm-sqlx
only.type Error = Error
fn decode_row(row: &DatabaseRow) -> Result<Self, Self::Error>
Source§impl DecodeRow<SqliteRow> for Record
Available on crate feature orm-sqlx
only.
impl DecodeRow<SqliteRow> for Record
Available on crate feature
orm-sqlx
only.