diesel::row

Trait 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>,