#[non_exhaustive]pub enum Caret {
Sorted(Sort),
Idle,
None,
}Expand description
The mark a column’s heading carries, and so the tone it is drawn in.
Three states with a mark and one without (wiki three-tone-convention):
the column in force, in its direction; a column that offers to be ordered
and is not; and a column that is not a control at all. The idle mark spells
as Sort::Ascending, the direction a first press takes, so pressing a
heading never changes its width.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sorted(Sort)
The table is ordered by this column, this way.
Idle
The column offers to order the table and is not doing it now.
None
No mark: the column neither orders the table nor offers to.
Implementations§
Source§impl Caret
impl Caret
Sourcepub const fn of(sorted: Option<Sort>, caret: bool) -> Self
pub const fn of(sorted: Option<Sort>, caret: bool) -> Self
The caret for a column ordered by sorted, with
ColumnRoom::caret saying whether a caret sits beside its heading.
A column sorted but not sortable still carries its direction: a list ordered by a key the user cannot change is a real thing, and the caret is how it says so.