pub trait TableOption<R, C, D> {
// Required method
fn change(self, records: &mut R, cfg: &mut C, dimension: &mut D);
// Provided method
fn hint_change(&self) -> Option<Entity> { ... }
}
Expand description
A trait which is responsible for configuration of a Table
.
Required Methods§
Provided Methods§
Sourcefn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
A hint whether an TableOption
is going to change table layout.
Return None
if no changes are being done.
Otherwise return:
- Entity::Global - a grand layout changed. (a change which MIGHT require height/width update)
- Entity::Row - a certain row was changed. (a change which MIGHT require height update)
- Entity::Column - a certain column was changed. (a change which MIGHT require width update)
- Entity::Cell - a certain cell was changed. (a local change, no width/height update)
By default it’s considered to be a grand change.
This methods primarily is used as an optimization,
to not make unnecessary calculations if they’re not needed, after using the TableOption
.