pub trait ColIdx: Debug + Copy {
type SqlxMySqlIndex: ColumnIndex<MySqlRow>;
type SqlxPostgresIndex: ColumnIndex<PgRow>;
type SqlxSqliteIndex: ColumnIndex<SqliteRow>;
// Required methods
fn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex;
fn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex;
fn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex;
fn as_str(&self) -> Option<&str>;
fn as_usize(&self) -> Option<&usize>;
}Expand description
Column Index, used by TryGetable. Implemented for &str and usize
Required Associated Typesยง
Sourcetype SqlxMySqlIndex: ColumnIndex<MySqlRow>
Available on crate feature sqlx-mysql only.
type SqlxMySqlIndex: ColumnIndex<MySqlRow>
sqlx-mysql only.Type surrogate
Sourcetype SqlxPostgresIndex: ColumnIndex<PgRow>
Available on crate feature sqlx-postgres only.
type SqlxPostgresIndex: ColumnIndex<PgRow>
sqlx-postgres only.Type surrogate
Sourcetype SqlxSqliteIndex: ColumnIndex<SqliteRow>
Available on crate feature sqlx-sqlite only.
type SqlxSqliteIndex: ColumnIndex<SqliteRow>
sqlx-sqlite only.Type surrogate
Required Methodsยง
Sourcefn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex
Available on crate feature sqlx-mysql only.
fn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex
sqlx-mysql only.Basically a no-op; only to satisfy trait bounds
Sourcefn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex
Available on crate feature sqlx-postgres only.
fn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex
sqlx-postgres only.Basically a no-op; only to satisfy trait bounds
Sourcefn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex
Available on crate feature sqlx-sqlite only.
fn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex
sqlx-sqlite only.Basically a no-op; only to satisfy trait bounds
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Typesยง
Sourceยงimpl ColIdx for &str
impl ColIdx for &str
Sourceยงtype SqlxMySqlIndex = &str
type SqlxMySqlIndex = &str
Available on crate feature
sqlx-mysql only.Sourceยงtype SqlxPostgresIndex = &str
type SqlxPostgresIndex = &str
Available on crate feature
sqlx-postgres only.Sourceยงtype SqlxSqliteIndex = &str
type SqlxSqliteIndex = &str
Available on crate feature
sqlx-sqlite only.Sourceยงfn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex
fn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex
Available on crate feature
sqlx-mysql only.Sourceยงfn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex
fn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex
Available on crate feature
sqlx-postgres only.Sourceยงfn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex
fn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex
Available on crate feature
sqlx-sqlite only.fn as_str(&self) -> Option<&str>
fn as_usize(&self) -> Option<&usize>
Sourceยงimpl ColIdx for usize
impl ColIdx for usize
Sourceยงtype SqlxMySqlIndex = usize
type SqlxMySqlIndex = usize
Available on crate feature
sqlx-mysql only.Sourceยงtype SqlxPostgresIndex = usize
type SqlxPostgresIndex = usize
Available on crate feature
sqlx-postgres only.Sourceยงtype SqlxSqliteIndex = usize
type SqlxSqliteIndex = usize
Available on crate feature
sqlx-sqlite only.Sourceยงfn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex
fn as_sqlx_mysql_index(&self) -> Self::SqlxMySqlIndex
Available on crate feature
sqlx-mysql only.Sourceยงfn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex
fn as_sqlx_postgres_index(&self) -> Self::SqlxPostgresIndex
Available on crate feature
sqlx-postgres only.Sourceยงfn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex
fn as_sqlx_sqlite_index(&self) -> Self::SqlxSqliteIndex
Available on crate feature
sqlx-sqlite only.