pub fn from_row<T: DeserializeOwned>(row: ResultRow) -> Result<T>
Available on crate feature
serde-support
only.Expand description
Deserialize a row into any type implementing Deserialize
.
let user: User = quaint::serde::from_row(row)?;
assert_eq!(user, User { name: "Georgina".to_string(), id: 12 });