Trait spin_sdk::pg::Decode

source ·
pub trait Decode: Sized {
    // Required method
    fn decode(value: &DbValue) -> Result<Self, Error>;
}
Expand description

A type that can be decoded from the database.

Required Methods§

source

fn decode(value: &DbValue) -> Result<Self, Error>

Decode a new value of this type using a DbValue.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Decode for bool

source§

fn decode(value: &DbValue) -> Result<Self, Error>

source§

impl Decode for f32

source§

fn decode(value: &DbValue) -> Result<Self, Error>

source§

impl Decode for f64

source§

fn decode(value: &DbValue) -> Result<Self, Error>

source§

impl Decode for i16

source§

fn decode(value: &DbValue) -> Result<Self, Error>

source§

impl Decode for i32

source§

fn decode(value: &DbValue) -> Result<Self, Error>

source§

impl Decode for i64

source§

fn decode(value: &DbValue) -> Result<Self, Error>

source§

impl Decode for String

source§

fn decode(value: &DbValue) -> Result<Self, Error>

source§

impl Decode for Vec<u8>

source§

fn decode(value: &DbValue) -> Result<Self, Error>

source§

impl<T> Decode for Option<T>
where T: Decode,

source§

fn decode(value: &DbValue) -> Result<Self, Error>

Implementors§