pub trait JsonColumnValue<T>: Sized {
// Required method
fn from_json(value: Json<T>) -> Self;
}Available on crate feature
serde only.Expand description
A model field value that can hold a JSON payload.
Dialect crates implement this for their insert and update value types. Table macros call it to convert the payload type of a JSON field.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<'a, T, Target, TargetNull> JsonColumnValue<T> for MySQLUpdateValue<'a, MySQLValue<'a>, T, Target, TargetNull>
impl<'a, T, Target, TargetNull> JsonColumnValue<T> for PostgresUpdateValue<'a, PostgresValue<'a>, T, Target, TargetNull>
The column’s SQL type marker (Target) selects json or jsonb.