pub trait TableClassesProvider {
// Required method
fn new() -> Self;
// Provided methods
fn thead(&self, prop_class: &str) -> String { ... }
fn thead_row(&self, prop_class: &str) -> String { ... }
fn thead_cell(&self, sort: ColumnSort, macro_class: &str) -> String { ... }
fn thead_cell_inner(&self) -> String { ... }
fn tbody(&self, prop_class: &str) -> String { ... }
fn row(&self, row_index: usize, selected: bool, prop_class: &str) -> String { ... }
fn loading_cell(
&self,
row_index: usize,
col_index: usize,
prop_class: &str,
) -> String { ... }
fn loading_cell_inner(
&self,
row_index: usize,
col_index: usize,
prop_class: &str,
) -> String { ... }
fn cell(&self, macro_class: &str) -> String { ... }
}
Expand description
A trait for providing classes for the table.
Required Methods§
Provided Methods§
Sourcefn thead(&self, prop_class: &str) -> String
fn thead(&self, prop_class: &str) -> String
Get the class attribute for the thead.
The prop_class
parameter contains the classes specified in the
thead_class
prop of the [TableContent
] component.
Sourcefn thead_row(&self, prop_class: &str) -> String
fn thead_row(&self, prop_class: &str) -> String
Get the classes for the thead row.
The prop_class
parameter contains the classes specified in the
thead_row_class
prop of the [TableContent
] component.
Sourcefn thead_cell(&self, sort: ColumnSort, macro_class: &str) -> String
fn thead_cell(&self, sort: ColumnSort, macro_class: &str) -> String
Get the classes for the thead cells.
The sort
parameter contains the sort state of the column.
The macro_class
parameter contains the classes specified in the head_class
macro attribute of the field.
Sourcefn thead_cell_inner(&self) -> String
fn thead_cell_inner(&self) -> String
Get the classes for the thead cells’ inner element.
Sourcefn tbody(&self, prop_class: &str) -> String
fn tbody(&self, prop_class: &str) -> String
Get the classes for the tbody.
The prop_class
parameter contains the classes specified in the
tbody_class
prop of the [TableContent
] component.
Sourcefn row(&self, row_index: usize, selected: bool, prop_class: &str) -> String
fn row(&self, row_index: usize, selected: bool, prop_class: &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 prop_class
parameter contains the classes specified in the row_class
prop of the [TableContent
] component.
Sourcefn loading_cell(
&self,
row_index: usize,
col_index: usize,
prop_class: &str,
) -> String
fn loading_cell( &self, row_index: usize, col_index: usize, prop_class: &str, ) -> String
Get the classes for the elements inside of the cells of rows that are currently
being loaded.
The prop_class
parameter contains the classes specified in the
loading_cell_class
prop of the [TableContent
] component.
Sourcefn loading_cell_inner(
&self,
row_index: usize,
col_index: usize,
prop_class: &str,
) -> String
fn loading_cell_inner( &self, row_index: usize, col_index: usize, prop_class: &str, ) -> String
Get the classes for the elements inside of the cells of rows that are currently
being loaded. Usually this will be some loading indicator like a sceleton bar.
The prop_class
parameter contains the classes specified in the
loading_cell_inner_class
prop of the [TableContent
] component.
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.