pub trait RowExt {
// Required method
fn to_json(&self) -> Value;
}Expand description
Converts a single database row into a JSON object.
Required Methods§
Sourcefn to_json(&self) -> Value
fn to_json(&self) -> Value
Converts this row’s columns to a JSON object.
Each column becomes a key in the returned object, with values
converted to the most appropriate JSON type. NULL columns
produce Value::Null.
§Returns
A Value::Object where keys are column names and values are
type-appropriate JSON values.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".