pub trait ToValue<S: ValueSchema> {
// Required method
fn to_value(self) -> Value<S>;
}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 cause a panic if the conversion is not possible, see TryToValue for a conversion that returns a result.
This is the counterpart to the TryFromValue trait.
See ToBlob for the counterpart trait for blobs.
Required Methods§
Sourcefn to_value(self) -> Value<S>
fn to_value(self) -> Value<S>
Convert the Rust type to a Value with a specific schema type. This might cause a panic if the conversion is not possible.
See the TryToValue trait for a conversion that returns a result.