pub trait TableClassesProvider: Clone {
    // Required method
    fn new() -> Self;

    // Provided methods
    fn table(&self, classes: &str) -> String { ... }
    fn head_row(&self, template_classes: &str) -> String { ... }
    fn head_cell(&self, sort: ColumnSort, template_classes: &str) -> String { ... }
    fn head_cell_inner(&self) -> String { ... }
    fn row(
        &self,
        row_index: usize,
        selected: bool,
        template_classes: &str
    ) -> String { ... }
    fn cell(&self, template_classes: &str) -> String { ... }
}
Expand description

A trait for providing classes for the table.

Required Methods§

source

fn new() -> Self

Create a new instance of the class provider.

Provided Methods§

source

fn table(&self, classes: &str) -> String

Get the classes for the root table element. The classes parameter contains the classes specified in the classes prop of the generated component.

source

fn head_row(&self, template_classes: &str) -> String

Get the classes for the head row. The template_classes parameter contains the classes specified in the head_row_class attribute of the struct.

source

fn head_cell(&self, sort: ColumnSort, template_classes: &str) -> String

Get the classes for the head cells. The sort parameter contains the sort state of the column. The template_classes parameter contains the classes specified in the head_class attribute of the field.

source

fn head_cell_inner(&self) -> String

Get the classes for the head cells’ inner element.

source

fn row( &self, row_index: usize, selected: bool, template_classes: &str ) -> String

Get the classes for the body rows. The row_index parameter contains the index of the row. The first row has index 0. The selected parameter indicates whether the row is selected. The template_classes parameter contains the classes specified in the row_class attribute of the struct.

source

fn cell(&self, template_classes: &str) -> String

Get the classes for the body cells. The template_classes parameter contains the classes specified in the class attribute of the field.

Object Safety§

This trait is not object safe.

Implementors§