pub trait Column:
'static
+ Send
+ Sync
+ Debug {
type Database: Database<Column = Self>;
// Required methods
fn ordinal(&self) -> usize;
fn name(&self) -> &str;
fn type_info(&self) -> &<Self::Database as Database>::TypeInfo;
// Provided method
fn origin(&self) -> ColumnOrigin { ... }
}Required Associated Types§
Required Methods§
Sourcefn ordinal(&self) -> usize
fn ordinal(&self) -> usize
Gets the column ordinal.
This can be used to unambiguously refer to this column within a row in case more than one column have the same name
Provided Methods§
Sourcefn origin(&self) -> ColumnOrigin
fn origin(&self) -> ColumnOrigin
If this column comes from a table, return the table and original column name.
Returns ColumnOrigin::Expression if the column is the result of an expression
or else the source table could not be determined.
Returns ColumnOrigin::Unknown if the database driver does not have that information,
or has not overridden this method.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".