pub trait ValueConverter: Sized {
// Required method
fn from_value(value: &Value) -> Result<Self>;
}Expand description
Trait for converting Values to native types.
This trait enables automatic conversion between Value instances and
native Rust types. It is implemented for common types like f64, String,
bool, DateTime, and Vec<T>.
This trait is automatically implemented for common types and is typically
used internally by the function registration macros in crate::macros.
Required Methods§
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.