Skip to main content

FromValue

Trait FromValue 

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

    // Required method
    fn from_value(value: Value) -> Option<Self>;
}
Expand description

One returned value.

Required Associated Constants§

Source

const EXPECTED: &'static str

Required 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".

Implementations on Foreign Types§

Source§

impl FromValue for bool

Source§

const EXPECTED: &'static str = "boolean"

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§

Source§

impl FromValue for Handle

Source§

const EXPECTED: &'static str = "userdata"

Source§

impl FromValue for Number

Source§

const EXPECTED: &'static str = "number"

Source§

impl FromValue for OcString

Source§

const EXPECTED: &'static str = "string"

Source§

impl FromValue for Value

Source§

const EXPECTED: &'static str = "any"