[−][src]Trait serde_db::de::DeserializableRow
A minimal interface for the Row type to support the deserialization.
Associated Types
type E: From<DeserializationError> + Sized
The error type used by the database driver.
type V: DbValue
The value type used by the database driver.
Required methods
fn len(&self) -> usize
Returns the current length of the row (which is decremented with each call to next()).
fn next(&mut self) -> Option<Self::V>
Removes and returns the next value.
fn number_of_fields(&self) -> usize
Returns the number of fields in a complete row.
fn fieldname(&self, field_idx: usize) -> Option<&str>
Returns the name of the column at the specified index.
Provided methods
fn into_typed<'de, T>(self) -> Result<T, Self::E> where
T: Deserialize<'de>,
T: Deserialize<'de>,
Converts the row into a struct, a tuple, or (if applicable) into a plain rust value.
Errors
An error is produced if deserialization into the target type is not possible.