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§

Performce the conversion

Panics

panics if the row does not contain the expected column names.

Try’s to perform the conversion.

Will return an error if the row does not contain the expected column names.

Implementors§