Skip to main content

NamedColumns

Trait NamedColumns 

Source
pub trait NamedColumns: SchemaWithPK {
    // Required method
    fn column_index(&self, column_name: &str) -> Option<usize>;
}
Expand description

Defines a schema in which the mapping of column names to column positions is known at runtime.

Required Methods§

Source

fn column_index(&self, column_name: &str) -> Option<usize>

Get the column index for a given column name.

Returns Some(index) if the column exists, or None if it doesn’t.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: NamedColumns> NamedColumns for &T

Source§

fn column_index(&self, column_name: &str) -> Option<usize>

Implementors§