pub trait LabelColumn: 'static {
type Item: Any;
type Value: PartialOrd + Display;
const COLUMN_NAME: &'static str;
const ENABLE_SORT: bool;
const ENABLE_RESIZE: bool = false;
const ENABLE_EXPAND: bool = false;
// Required method
fn get_cell_value(item: &Self::Item) -> Self::Value;
// Provided method
fn format_cell_value(value: &Self::Value) -> String { ... }
}Expand description
Simplified trait for creating columns with only one gtk::Label widget per-entry (i.e. a text cell)
Required Associated Constants§
Sourceconst COLUMN_NAME: &'static str
const COLUMN_NAME: &'static str
Name of the column
Sourceconst ENABLE_SORT: bool
const ENABLE_SORT: bool
Whether to enable the sorting for this column
Provided Associated Constants§
Sourceconst ENABLE_RESIZE: bool = false
const ENABLE_RESIZE: bool = false
Whether to enable resizing for this column
Sourceconst ENABLE_EXPAND: bool = false
const ENABLE_EXPAND: bool = false
Whether to enable automatic expanding for this column
Required Associated Types§
Required Methods§
Sourcefn get_cell_value(item: &Self::Item) -> Self::Value
fn get_cell_value(item: &Self::Item) -> Self::Value
Get the value that this column represents.
Provided Methods§
Sourcefn format_cell_value(value: &Self::Value) -> String
fn format_cell_value(value: &Self::Value) -> String
Format the value for presentation in the text cell.
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.