pub trait FromValue<OK = Self> {
// Required method
fn from_value(value: Value) -> Result<OK, ConversionError>;
// Provided method
fn from_no_value() -> Result<OK, ConversionError> { ... }
}Expand description
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, ConversionError>
Provided Methods§
fn from_no_value() -> Result<OK, ConversionError>
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.