pub trait FromRelationalRow: Sized {
const SCALAR_COLUMNS: &'static [&'static str];
// Required method
fn from_relational_values(values: &[Value]) -> Result<Self, DbCoreError>;
}Expand description
Types deserialized from relational query rows (scalar + JSON relation columns).
Required Associated Constants§
Sourceconst SCALAR_COLUMNS: &'static [&'static str]
const SCALAR_COLUMNS: &'static [&'static str]
Column names for scalar (non-relation) fields, in order.
Required Methods§
Sourcefn from_relational_values(values: &[Value]) -> Result<Self, DbCoreError>
fn from_relational_values(values: &[Value]) -> Result<Self, DbCoreError>
Construct Self from JSON values (scalars then relation columns).
§Errors
Returns DbCoreError::RowMapping when any scalar or relation column fails to deserialize.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".