Trait postgres_from_row::FromRow
source · [−]pub trait FromRow: Sized {
fn from_row(row: &Row) -> Self;
fn try_from_row(row: &Row) -> Result<Self, Error>;
}Expand description
A trait that allows mapping rows from either postgres or tokio-postgres, to other types.
Required Methods
sourcefn try_from_row(row: &Row) -> Result<Self, Error>
fn try_from_row(row: &Row) -> Result<Self, Error>
Try’s to perform the conversion.
Will return an error if the row does not contain the expected column names.