pub trait ColumnIndex:
ColumnIndex
+ Debug
+ Display { }Expand description
A trait for types that can be used to index into a Row.
§Example
fn print_column_value<I: ColumnIndex>(row: &Row, index: I) -> Result<(), google_cloud_spanner::Error> {
let value: String = row.get(index)?;
println!("Value: {value}");
Ok(())
}This trait is sealed and cannot be implemented for types outside of this crate.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".