pub trait FromValue: Sized {
// Required method
fn from_value(value: Value) -> Result<Self>;
// Provided methods
fn from_value_with_command(value: Value, _command: &Command) -> Result<Self> { ... }
fn next_functor<I: Iterator<Item = Value>>( ) -> Box<dyn FnMut(&mut I) -> Option<Result<Self>>> { ... }
}
Required Methods§
Sourcefn from_value(value: Value) -> Result<Self>
fn from_value(value: Value) -> Result<Self>
Used to do Value
to user type conversion
§Errors
Any parsing error (Error::Client
) due to incompatibility between Value variant and taget type
Provided Methods§
fn from_value_with_command(value: Value, _command: &Command) -> Result<Self>
fn next_functor<I: Iterator<Item = Value>>() -> Box<dyn FnMut(&mut I) -> Option<Result<Self>>>
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.