Skip to main content

FromRow

Trait FromRow 

Source
pub trait FromRow: Sized {
    // Required method
    fn from_row(row: &Row) -> Result<Self, PgError>;
}
Expand description

Trait for types that can be constructed from a database Row. Used by query_as, query_one_as, query_first_as. Typically derived with #[derive(FromRow)].

Required Methods§

Source

fn from_row(row: &Row) -> Result<Self, PgError>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§