Skip to main content

RowIndex

Trait RowIndex 

Source
pub trait RowIndex: Debug + Display {
    // Required methods
    fn contains(&self, row: &Row) -> bool;
    fn index(self, row: &Row) -> usize;
}
Expand description

A type suitable for indexing columns in a row.

Required Methods§

Source

fn contains(&self, row: &Row) -> bool

Check if the index is present in a row.

Source

fn index(self, row: &Row) -> usize

Identify the ordinal position.

The first column has index 0.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl RowIndex for &str

Source§

fn contains(&self, row: &Row) -> bool

Source§

fn index(self, row: &Row) -> usize

Source§

impl RowIndex for usize

Source§

fn contains(&self, row: &Row) -> bool

Source§

fn index(self, row: &Row) -> usize

Implementors§