#[non_exhaustive]pub enum ColumnKind {
Text,
Identifier,
Date,
Number,
Code,
Status,
Actions,
}Expand description
What a column holds.
wiki table-model: the kind is what carries a column’s look, and four of
the reference table’s six rules were per kind rather than per table. A
description states what the column is; each renderer decides what that
looks like in its host, from the facts below rather than from the name.
#[non_exhaustive], Width’s reasoning.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Text
Prose. Wraps. What a column is when it says nothing else.
Identifier
A name a machine made: a fingerprint, a hash, a slug. Monospace, and breaks mid-string rather than widening the table.
Date
A point in time. Never wraps, so a date cannot print over its neighbour, and its figures line up down the column.
Number
A quantity. Figures line up and the column aligns to its end, so magnitudes compare by length.
Code
Source text, one row per line. Monospace and never wrapped. A table holding one is read as code, so its rows are not striped or spaced as records.
Status
A state the row is in, drawn as a chip rather than as coloured text.
Actions
The row’s controls. Aligns to its end and shrinks to what it holds.
Implementations§
Source§impl ColumnKind
impl ColumnKind
Sourcepub const fn aligns_end(self) -> bool
pub const fn aligns_end(self) -> bool
Whether the column aligns to its end rather than its start.
Trait Implementations§
Source§impl Clone for ColumnKind
impl Clone for ColumnKind
Source§fn clone(&self) -> ColumnKind
fn clone(&self) -> ColumnKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more