Trait sqlx_core::column::ColumnIndex [−][src]
pub trait ColumnIndex<T: ?Sized>: Sealed + Debug { fn index(&self, container: &T) -> Result<usize, Error>; }
Expand description
A type that can be used to index into a Row or Statement.
The get and try_get methods of Row accept any type that implements ColumnIndex.
This trait is implemented for strings which are used to look up a column by name, and for
usize which is used as a positional index into the row.
This trait is sealed and cannot be implemented for types outside of SQLx.
Required methods
fn index(&self, container: &T) -> Result<usize, Error>[src]
fn index(&self, container: &T) -> Result<usize, Error>[src]Returns a valid positional index into the row or statement, ColumnIndexOutOfBounds, or,
ColumnNotFound.
Implementations on Foreign Types
impl<T: ?Sized, I: ColumnIndex<T> + ?Sized> ColumnIndex<T> for &I[src]
impl<T: ?Sized, I: ColumnIndex<T> + ?Sized> ColumnIndex<T> for &I[src]impl<'i> ColumnIndex<AnyRow> for &'i str where
&'i str: AnyColumnIndex, [src]
impl<'i> ColumnIndex<AnyRow> for &'i str where
&'i str: AnyColumnIndex, [src]impl<'i> ColumnIndex<AnyStatement<'_>> for &'i str where
&'i str: AnyColumnIndex, [src]
impl<'i> ColumnIndex<AnyStatement<'_>> for &'i str where
&'i str: AnyColumnIndex, [src]impl ColumnIndex<AnyStatement<'_>> for usize[src]
impl ColumnIndex<AnyStatement<'_>> for usize[src]impl ColumnIndex<PgStatement<'_>> for &str[src]
impl ColumnIndex<PgStatement<'_>> for &str[src]impl ColumnIndex<PgStatement<'_>> for usize[src]
impl ColumnIndex<PgStatement<'_>> for usize[src]impl ColumnIndex<SqliteRow> for &str[src]
impl ColumnIndex<SqliteRow> for &str[src]impl ColumnIndex<SqliteStatement<'_>> for &str[src]
impl ColumnIndex<SqliteStatement<'_>> for &str[src]impl ColumnIndex<SqliteRow> for usize[src]
impl ColumnIndex<SqliteRow> for usize[src]impl ColumnIndex<SqliteStatement<'_>> for usize[src]
impl ColumnIndex<SqliteStatement<'_>> for usize[src]impl ColumnIndex<MySqlRow> for &str[src]
impl ColumnIndex<MySqlRow> for &str[src]impl ColumnIndex<MySqlStatement<'_>> for &str[src]
impl ColumnIndex<MySqlStatement<'_>> for &str[src]impl ColumnIndex<MySqlRow> for usize[src]
impl ColumnIndex<MySqlRow> for usize[src]impl ColumnIndex<MySqlStatement<'_>> for usize[src]
impl ColumnIndex<MySqlStatement<'_>> for usize[src]impl ColumnIndex<MssqlRow> for &str[src]
impl ColumnIndex<MssqlRow> for &str[src]impl ColumnIndex<MssqlStatement<'_>> for &str[src]
impl ColumnIndex<MssqlStatement<'_>> for &str[src]impl ColumnIndex<MssqlRow> for usize[src]
impl ColumnIndex<MssqlRow> for usize[src]impl ColumnIndex<MssqlStatement<'_>> for usize[src]
impl ColumnIndex<MssqlStatement<'_>> for usize[src]