Function serde_rusqlite::from_row_with_columns
source · pub fn from_row_with_columns<'row, D: DeserializeOwned, S: AsRef<str>>(
row: &'row Row<'_, '_>,
columns: &'row [S]
) -> Result<D>
Expand description
Deserializes any instance of D: serde::Deserialize
from rusqlite::Row
with specified columns. You need to call
this version if you’re deserializing into e.g. Map
because it needs field names, but doesn’t specify them. Also
note that columns
will only be used in this case, otherwise D
type field information will be used.
You should use this function in the closure you supply to query_map()