pub trait TryToValue<S: ValueSchema> {
type Error;
// Required method
fn try_to_value(self) -> Result<Value<S>, Self::Error>;
}Expand description
A trait for converting a Rust type to a Value with a specific schema type. This trait is implemented on the concrete Rust type.
This might return an error if the conversion is not possible, see ToValue for cases where the conversion is guaranteed to succeed (or panic).
This is the counterpart to the TryFromValue trait.