Skip to main content

FromValue

Trait FromValue 

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

    // Required method
    fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>;
}

Required Associated Constants§

Source

const EXPECTED: &'static str

Required Methods§

Source

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

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 FromValue for String

Source§

const EXPECTED: &'static str = "string"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for Vec<u8>

Source§

const EXPECTED: &'static str = "bytes"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for bool

Source§

const EXPECTED: &'static str = "boolean"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for f32

Source§

const EXPECTED: &'static str = "f32"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for f64

Source§

const EXPECTED: &'static str = "f64"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for i8

Source§

const EXPECTED: &'static str = "i8"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for i16

Source§

const EXPECTED: &'static str = "i16"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for i32

Source§

const EXPECTED: &'static str = "i32"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for i64

Source§

const EXPECTED: &'static str = "i64"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for isize

Source§

const EXPECTED: &'static str = "isize"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for u8

Source§

const EXPECTED: &'static str = "u8"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for u16

Source§

const EXPECTED: &'static str = "u16"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for u32

Source§

const EXPECTED: &'static str = "u32"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for u64

Source§

const EXPECTED: &'static str = "u64"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl FromValue for usize

Source§

const EXPECTED: &'static str = "usize"

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Source§

impl<T: FromValue> FromValue for Option<T>

Source§

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

Source§

fn from_value(value: &Value, index: usize) -> Result<Self, DecodeError>

Implementors§

Source§

impl<T: FromValue> FromValue for SqlArray<T>

Source§

const EXPECTED: &'static str = "array"