pub trait FromValueBehavior {
type Item;
// Required method
fn from_value(value: Value) -> Option<Self::Item>;
}Expand description
A trait for converting Value to types.
Required Associated Types§
Required Methods§
Sourcefn from_value(value: Value) -> Option<Self::Item>
fn from_value(value: Value) -> Option<Self::Item>
Converts a Value into a type.
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 FromValueBehavior for &str
impl FromValueBehavior for &str
Source§impl FromValueBehavior for bool
impl FromValueBehavior for bool
Source§impl FromValueBehavior for f32
impl FromValueBehavior for f32
Source§impl FromValueBehavior for f64
impl FromValueBehavior for f64
Source§impl FromValueBehavior for i8
impl FromValueBehavior for i8
Source§impl FromValueBehavior for i16
impl FromValueBehavior for i16
Source§impl FromValueBehavior for i32
impl FromValueBehavior for i32
Source§impl FromValueBehavior for i64
impl FromValueBehavior for i64
Source§impl FromValueBehavior for i128
impl FromValueBehavior for i128
Source§impl FromValueBehavior for str
impl FromValueBehavior for str
Source§impl FromValueBehavior for u8
impl FromValueBehavior for u8
Source§impl FromValueBehavior for u16
impl FromValueBehavior for u16
Source§impl FromValueBehavior for u32
impl FromValueBehavior for u32
Source§impl FromValueBehavior for u64
impl FromValueBehavior for u64
Source§impl FromValueBehavior for u128
impl FromValueBehavior for u128
Source§impl FromValueBehavior for String
Available on non-crate feature cstring only.
impl FromValueBehavior for String
Available on non-crate feature
cstring only.Source§impl<T> FromValueBehavior for Option<T>where
T: FromValueBehavior,
impl<T> FromValueBehavior for Option<T>where
T: FromValueBehavior,
type Item = Option<<T as FromValueBehavior>::Item>
fn from_value(value: Value) -> Option<<Option<T> as FromValueBehavior>::Item>
Source§impl<T> FromValueBehavior for BTreeMap<String, T>where
T: FromValueBehavior,
Available on non-crate feature cstring only.
impl<T> FromValueBehavior for BTreeMap<String, T>where
T: FromValueBehavior,
Available on non-crate feature
cstring only.Source§impl<T> FromValueBehavior for Vec<T>where
T: FromValueBehavior,
impl<T> FromValueBehavior for Vec<T>where
T: FromValueBehavior,
type Item = Vec<<T as FromValueBehavior>::Item>
fn from_value(value: Value) -> Option<<Vec<T> as FromValueBehavior>::Item>
Source§impl<T> FromValueBehavior for HashMap<String, T>where
T: FromValueBehavior,
Available on non-crate feature cstring only.
impl<T> FromValueBehavior for HashMap<String, T>where
T: FromValueBehavior,
Available on non-crate feature
cstring only.