spin_sdk::mysql

Trait 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.

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 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 i8

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 u8

Source§

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

Source§

impl Decode for u16

Source§

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

Source§

impl Decode for u32

Source§

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

Source§

impl Decode for u64

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§