Skip to main content

RowIndex

Trait RowIndex 

Source
pub trait RowIndex: Sealed {
    // Required method
    fn idx(&self, stmt: &Statement<'_>) -> Result<usize>;
}
Expand description

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

It is only implemented for usize and &str.

Required Methods§

Source

fn idx(&self, stmt: &Statement<'_>) -> Result<usize>

Returns the index of the appropriate column, or None if no such column exists.

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 idx(&self, stmt: &Statement<'_>) -> Result<usize>

Source§

impl RowIndex for usize

Source§

fn idx(&self, stmt: &Statement<'_>) -> Result<usize>

Implementors§