SqlxDecode

Trait SqlxDecode 

Source
pub trait SqlxDecode: Sized {
    // Required method
    fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>;
}
Expand description

Trait for decoding values from a row by index.

Required Methods§

Source

fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>

Decode a value from a row at the given index.

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 SqlxDecode for bool

Source§

fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>

Source§

impl SqlxDecode for f32

Source§

fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>

Source§

impl SqlxDecode for f64

Source§

fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>

Source§

impl SqlxDecode for i32

Source§

fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>

Source§

impl SqlxDecode for i64

Source§

fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>

Source§

impl SqlxDecode for String

Source§

fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>

Source§

impl SqlxDecode for Vec<u8>

Source§

fn decode_from_row(row: &SqlxRow, index: usize) -> SqlxResult<Self>

Implementors§