Skip to main content

TryFromValue

Trait TryFromValue 

Source
pub trait TryFromValue: Sized {
    // Required method
    fn try_from_value(value: &Value) -> Result<Self, FromValueError>;

    // Provided method
    fn from_value(value: &Value) -> Option<Self> { ... }
}

Required Methods§

Provided Methods§

Source

fn from_value(value: &Value) -> Option<Self>

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

Source§

impl TryFromValue for f32

Source§

impl TryFromValue for f64

Source§

impl TryFromValue for i8

Source§

impl TryFromValue for i16

Source§

impl TryFromValue for i32

Source§

impl TryFromValue for i64

Source§

impl TryFromValue for i128

Source§

impl TryFromValue for u8

Source§

impl TryFromValue for u16

Source§

impl TryFromValue for u32

Source§

impl TryFromValue for u64

Source§

impl TryFromValue for u128

Source§

impl TryFromValue for String

Implementors§