pub trait ToValue {
// Required method
fn to_value(&self) -> Value;
}Expand description
Converts Rust types to Spanner Value.
This trait is used to encode native Rust types into the generic Value
representation suitable for transmission to Cloud Spanner (such as in query parameters
or mutation values).
Implementations are provided for standard Rust types, mapping them to their appropriate
Spanner values. For example, optional types naturally map to Value::Null when they are None.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".