Trait RowIndex

Source
pub trait RowIndex {
    // Required method
    fn idx(&self, row: &mut ResultRow<'_, '_>) -> Option<ColIx>;
}
Expand description

A trait implemented by types that can index into columns of a row.

inspired by sfackler’s RowIndex RowIndex: http://www.rust-ci.org/sfackler/rust-postgres/doc/postgres/trait.RowIndex.html

Required Methods§

Source

fn idx(&self, row: &mut ResultRow<'_, '_>) -> Option<ColIx>

Try to convert self to an index into a row.

Implementations on Foreign Types§

Source§

impl RowIndex for &'static str

Source§

fn idx(&self, row: &mut ResultRow<'_, '_>) -> Option<ColIx>

Index into a row by column name.

TODO: figure out how to use lifetime of row rather than static.

Implementors§