Skip to main content

ExtractValue

Trait ExtractValue 

Source
pub trait ExtractValue: Sized {
    // Required methods
    fn extract(row: &Row, col: &str) -> OrmResult<Self>;
    fn extract_at(row: &Row, index: usize) -> OrmResult<Self>;
    fn from_pg_value(val: PgValue) -> OrmResult<Self>;
}

Required Methods§

Source

fn extract(row: &Row, col: &str) -> OrmResult<Self>

Source

fn extract_at(row: &Row, index: usize) -> OrmResult<Self>

Source

fn from_pg_value(val: PgValue) -> OrmResult<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 ExtractValue for bool

Source§

fn extract(row: &Row, col: &str) -> OrmResult<Self>

Source§

fn extract_at(row: &Row, index: usize) -> OrmResult<Self>

Source§

fn from_pg_value(val: PgValue) -> OrmResult<Self>

Source§

impl ExtractValue for f32

Source§

fn extract(row: &Row, col: &str) -> OrmResult<Self>

Source§

fn extract_at(row: &Row, index: usize) -> OrmResult<Self>

Source§

fn from_pg_value(val: PgValue) -> OrmResult<Self>

Source§

impl ExtractValue for f64

Source§

fn extract(row: &Row, col: &str) -> OrmResult<Self>

Source§

fn extract_at(row: &Row, index: usize) -> OrmResult<Self>

Source§

fn from_pg_value(val: PgValue) -> OrmResult<Self>

Source§

impl ExtractValue for i32

Source§

fn extract(row: &Row, col: &str) -> OrmResult<Self>

Source§

fn extract_at(row: &Row, index: usize) -> OrmResult<Self>

Source§

fn from_pg_value(val: PgValue) -> OrmResult<Self>

Source§

impl ExtractValue for i64

Source§

fn extract(row: &Row, col: &str) -> OrmResult<Self>

Source§

fn extract_at(row: &Row, index: usize) -> OrmResult<Self>

Source§

fn from_pg_value(val: PgValue) -> OrmResult<Self>

Source§

impl ExtractValue for String

Source§

fn extract(row: &Row, col: &str) -> OrmResult<Self>

Source§

fn extract_at(row: &Row, index: usize) -> OrmResult<Self>

Source§

fn from_pg_value(val: PgValue) -> OrmResult<Self>

Source§

impl<T: ExtractValue> ExtractValue for Option<T>

Source§

fn extract(row: &Row, col: &str) -> OrmResult<Self>

Source§

fn extract_at(row: &Row, index: usize) -> OrmResult<Self>

Source§

fn from_pg_value(val: PgValue) -> OrmResult<Self>

Implementors§