Trait mica::TryFromValue
source · [−]pub trait TryFromValuewhere
Self: Sized,{
fn try_from_value(value: &Value, env: &Environment) -> Result<Self, Error>;
}
Expand description
Implemented by types that can be constructed as owned from Value
s.
Required Methods
sourcefn try_from_value(value: &Value, env: &Environment) -> Result<Self, Error>
fn try_from_value(value: &Value, env: &Environment) -> Result<Self, Error>
Tries to perform the conversion, returning an Error
on failure.
Implementations on Foreign Types
sourceimpl TryFromValue for ()
impl TryFromValue for ()
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for bool
impl TryFromValue for bool
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for u8
impl TryFromValue for u8
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for u16
impl TryFromValue for u16
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for u32
impl TryFromValue for u32
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for u64
impl TryFromValue for u64
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for usize
impl TryFromValue for usize
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for i8
impl TryFromValue for i8
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for i16
impl TryFromValue for i16
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for i32
impl TryFromValue for i32
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for i64
impl TryFromValue for i64
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for isize
impl TryFromValue for isize
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for f32
impl TryFromValue for f32
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for f64
impl TryFromValue for f64
fn try_from_value(value: &Value, _: &Environment) -> Result<Self, Error>
sourceimpl TryFromValue for String
impl TryFromValue for String
fn try_from_value(value: &Value, env: &Environment) -> Result<Self, Error>
sourceimpl<T> TryFromValue for Option<T>where
T: TryFromValue,
impl<T> TryFromValue for Option<T>where
T: TryFromValue,
fn try_from_value(value: &Value, env: &Environment) -> Result<Self, Error>
sourceimpl<T> TryFromValue for Vec<T>where
T: TryFromValue,
impl<T> TryFromValue for Vec<T>where
T: TryFromValue,
fn try_from_value(value: &Value, env: &Environment) -> Result<Self, Error>
Implementors
impl TryFromValue for Value
impl TryFromValue for Gc<String>
impl<T> TryFromValue for Twhere
T: UserData + Clone,
It is possible to accept arbitrary types implementing UserData
as parameters to functions,
however some limitations apply: