Skip to main content

TableRowMeta

Trait TableRowMeta 

Source
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§

Source

const TABLE_ID: &'static str

Unique identifier for this row type.

Source

const TABLE_TITLE: &'static str

Human-readable title for the table.

Required Methods§

Source

fn table_columns() -> Vec<Column>

Returns the column definitions for this row type.

Source

fn cell_value(&self, col_ix: usize) -> Box<dyn TableCell + '_>

Returns the value for a specific column index.

Provided Methods§

Source

fn table_title() -> String

Returns the table title. This can be overridden to provide dynamic titles, for example from localization libraries.

Source

fn table_id() -> TableId<'static>

Returns the typed table identifier.

Source

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".

Implementors§