Trait nereon::FromValue [−][src]
pub trait FromValue<OK = Self> { fn from_value(value: Value) -> Result<OK, String>; fn from_no_value() -> Result<OK, String> { ... } }
Trait for conversion from Value
into arbitrary types.
This trait is used by the get
and
lookup
Value
methods.
Implementations exist for several standard types.
Implemnataions can be automatically derived by using the
nereon_derive
crate.
Required Methods
fn from_value(value: Value) -> Result<OK, String>
Provided Methods
fn from_no_value() -> Result<OK, String>
Implementations on Foreign Types
impl FromValue for u8
[src]
impl FromValue for u8
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for u16
[src]
impl FromValue for u16
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for u32
[src]
impl FromValue for u32
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for u64
[src]
impl FromValue for u64
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for i8
[src]
impl FromValue for i8
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for i16
[src]
impl FromValue for i16
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for i32
[src]
impl FromValue for i32
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for i64
[src]
impl FromValue for i64
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for f32
[src]
impl FromValue for f32
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for f64
[src]
impl FromValue for f64
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl FromValue for String
[src]
impl FromValue for String
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<OK, String>
[src]
fn from_no_value() -> Result<OK, String>
impl<T> FromValue for Option<T> where
T: FromValue,
[src]
impl<T> FromValue for Option<T> where
T: FromValue,
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<Self, String>
[src]
fn from_no_value() -> Result<Self, String>
impl<T, S: BuildHasher + Default> FromValue for HashMap<String, T, S> where
T: FromValue,
[src]
impl<T, S: BuildHasher + Default> FromValue for HashMap<String, T, S> where
T: FromValue,
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<Self, String>
[src]
fn from_no_value() -> Result<Self, String>
impl<T> FromValue for Vec<T> where
T: FromValue,
[src]
impl<T> FromValue for Vec<T> where
T: FromValue,
fn from_value(value: Value) -> Result<Self, String>
[src]
fn from_value(value: Value) -> Result<Self, String>
fn from_no_value() -> Result<Self, String>
[src]
fn from_no_value() -> Result<Self, String>
Implementors
impl FromValue for Value