zino_orm

Trait DecodeRow

Source
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§

Source

type Error

The error type.

Required Methods§

Source

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.
Source§

impl DecodeRow<SqliteRow> for Record

Available on crate feature orm-sqlx only.

Implementors§