pub trait FromRow: Sized {
// Required method
fn from_row(data_schema: &Schema, row: Vec<Value>) -> Result<Self, Error>;
}
Expand description
Represents any structure which can deserialize
a table row of json fields provided a Schema
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl FromRow for DataRow
impl<'de, T: Deserialize<'de>> FromRow for T
Implementation of FromRow
for all implementers of Deserialize
.
Utilizes a deserializing wrapper which defers to the Json deserializer except when deserializing to a map or a structure, in which case it provides the column names as keys.