pub trait ColumnNames: NamedColumns {
// Required method
fn column_name(&self, index: usize) -> Option<&str>;
// Provided method
fn pk_indices(&self) -> Vec<usize> { ... }
}Expand description
Trait for tables that can provide column names by index.
This extends NamedColumns to support SQL generation.
Required Methods§
Sourcefn column_name(&self, index: usize) -> Option<&str>
fn column_name(&self, index: usize) -> Option<&str>
Get the column name for a given index.
Returns None if the index is out of bounds.
Provided Methods§
Sourcefn pk_indices(&self) -> Vec<usize>
fn pk_indices(&self) -> Vec<usize>
Get the column indices that are part of the primary key, in PK order.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".