Trait diesel::row::RowIndex

source ·
pub trait RowIndex<I> {
    // Required method
    fn idx(&self, idx: I) -> Option<usize>;
}
Expand description

Representing a way to index into database rows

  • Crates using existing backends should use existing implementations of this traits. Diesel provides RowIndex<usize> and RowIndex<&str> for all built-in backends

  • Crates implementing custom backends need to provide RowIndex<usize> and RowIndex<&str> impls for their Row type.

Required Methods§

source

fn idx(&self, idx: I) -> Option<usize>

Get the numeric index inside the current row for the provided index value

Implementors§

source§

impl<'a, 'b, R> RowIndex<&'a str> for PartialRow<'b, R>where R: RowIndex<&'a str>,

source§

impl<'a, R> RowIndex<usize> for PartialRow<'a, R>where R: RowIndex<usize>,