Skip to main content

Decode

Trait Decode 

Source
pub trait Decode: Sized {
    const N_COLS: usize;

    // Required method
    fn decode_at(row: &Row<'_>, col_offset: usize) -> Result<Self>;

    // Provided method
    fn decode(row: &Row<'_>) -> Result<Self> { ... }
}

Required Associated Constants§

Required Methods§

Source

fn decode_at(row: &Row<'_>, col_offset: usize) -> Result<Self>

Provided Methods§

Source

fn decode(row: &Row<'_>) -> Result<Self>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Decode for String

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for Vec<u8>

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for bool

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for f32

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for f64

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for i8

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for i16

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for i32

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for i64

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for isize

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for u8

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for u16

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for u32

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl Decode for u64

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl<A: Decode, B: Decode, C: Decode, D: Decode> Decode for (A, B, C, D)

Source§

const N_COLS: usize

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl<A: Decode, B: Decode, C: Decode> Decode for (A, B, C)

Source§

const N_COLS: usize

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl<A: Decode, B: Decode> Decode for (A, B)

Source§

const N_COLS: usize

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Source§

impl<T: FromSql> Decode for Option<T>

Source§

const N_COLS: usize = 1

Source§

fn decode_at(row: &Row<'_>, off: usize) -> Result<Self>

Implementors§