pub trait AsValue {
// Required methods
fn as_empty_value() -> Value;
fn as_value(self) -> Value;
fn try_from_value(value: Value) -> Result<Self>
where Self: Sized;
// Provided method
fn parse(input: impl AsRef<str>) -> Result<Self>
where Self: Sized { ... }
}Expand description
Bidirectional conversion between Rust types and Value.
Required Methods§
Sourcefn as_empty_value() -> Value
fn as_empty_value() -> Value
Return NULL variant.
Sourcefn try_from_value(value: Value) -> Result<Self>where
Self: Sized,
fn try_from_value(value: Value) -> Result<Self>where
Self: Sized,
Convert from Value.
Provided 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.