pub trait TableRowMeta {
const TABLE_ID: &'static str;
const TABLE_TITLE: &'static str;
// Required methods
fn table_columns() -> Vec<Column>;
fn cell_value(&self, col_ix: usize) -> Box<dyn TableCell + '_>;
// Provided methods
fn table_title() -> String { ... }
fn table_id() -> TableId<'static> { ... }
fn table_filters() -> Vec<FilterConfig> { ... }
}Expand description
Metadata for a table row type.
Required Associated Constants§
Sourceconst TABLE_TITLE: &'static str
const TABLE_TITLE: &'static str
Human-readable title for the table.
Required Methods§
Sourcefn table_columns() -> Vec<Column>
fn table_columns() -> Vec<Column>
Returns the column definitions for this row type.
Sourcefn cell_value(&self, col_ix: usize) -> Box<dyn TableCell + '_>
fn cell_value(&self, col_ix: usize) -> Box<dyn TableCell + '_>
Returns the value for a specific column index.
Provided Methods§
Sourcefn table_title() -> String
fn table_title() -> String
Returns the table title. This can be overridden to provide dynamic titles, for example from localization libraries.
Sourcefn table_filters() -> Vec<FilterConfig>
fn table_filters() -> Vec<FilterConfig>
Returns the filter configuration for the table.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".