Skip to main content

FromColumn

Trait FromColumn 

Source
pub trait FromColumn: Sized {
    const EXPECTED: &'static str;

    // Required method
    fn read(row: &Row<'_>, index: usize) -> Result<Self, DbError>;
}

Required Associated Constants§

Source

const EXPECTED: &'static str

Required Methods§

Source

fn read(row: &Row<'_>, index: usize) -> Result<Self, DbError>

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 FromColumn for f64

Source§

const EXPECTED: &'static str = "REAL"

Source§

fn read(row: &Row<'_>, index: usize) -> Result<Self, DbError>

Source§

impl FromColumn for i64

Source§

const EXPECTED: &'static str = "INTEGER"

Source§

fn read(row: &Row<'_>, index: usize) -> Result<Self, DbError>

Source§

impl FromColumn for String

Source§

const EXPECTED: &'static str = "TEXT"

Source§

fn read(row: &Row<'_>, index: usize) -> Result<Self, DbError>

Source§

impl FromColumn for Vec<u8>

Source§

const EXPECTED: &'static str = "BLOB"

Source§

fn read(row: &Row<'_>, index: usize) -> Result<Self, DbError>

Source§

impl<T: FromColumn> FromColumn for Option<T>

Source§

const EXPECTED: &'static str = T::EXPECTED

Source§

fn read(row: &Row<'_>, index: usize) -> Result<Self, DbError>

Implementors§

Source§

impl FromColumn for TextLen

Source§

const EXPECTED: &'static str = "TEXT"