[−][src]Trait sqlx::ColumnIndex
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>
Returns a valid positional index into the row or statement, ColumnIndexOutOfBounds
, or,
ColumnNotFound
.
Implementations on Foreign Types
impl<'_, T, I> ColumnIndex<T> for &'_ I where
I: ColumnIndex<T> + ?Sized,
T: ?Sized,
[src]
I: ColumnIndex<T> + ?Sized,
T: ?Sized,
impl ColumnIndex<MySqlRow> for usize
[src]
impl<'_, '_> ColumnIndex<PgStatement<'_>> for &'_ str
[src]
impl ColumnIndex<MssqlRow> for usize
[src]
impl<'_> ColumnIndex<MssqlRow> for &'_ str
[src]
impl ColumnIndex<SqliteRow> for usize
[src]
impl<'_> ColumnIndex<SqliteStatement<'_>> for usize
[src]
impl<'_> ColumnIndex<PgStatement<'_>> for usize
[src]
impl<'i> ColumnIndex<AnyRow> for &'i str where
&'i str: AnyColumnIndex,
[src]
&'i str: AnyColumnIndex,
impl<'_, '_> ColumnIndex<MssqlStatement<'_>> for &'_ str
[src]
impl<'_> ColumnIndex<MssqlStatement<'_>> for usize
[src]
impl ColumnIndex<AnyRow> for usize
[src]
impl ColumnIndex<PgRow> for usize
[src]
impl<'_, '_> ColumnIndex<MySqlStatement<'_>> for &'_ str
[src]
impl<'_> ColumnIndex<MySqlRow> for &'_ str
[src]
impl<'_> ColumnIndex<PgRow> for &'_ str
[src]
impl<'_> ColumnIndex<AnyStatement<'_>> for usize
[src]
impl<'_> ColumnIndex<MySqlStatement<'_>> for usize
[src]
impl<'i, '_> ColumnIndex<AnyStatement<'_>> for &'i str where
&'i str: AnyColumnIndex,
[src]
&'i str: AnyColumnIndex,