#[non_exhaustive]pub struct TableInk {
pub header: Style,
pub sorted: Style,
pub sortable: Style,
pub value: Style,
pub tokens: Style,
pub actions: Style,
pub link: Style,
pub selected: Style,
pub ground: Style,
pub stripe: Style,
pub style: TableStyle,
}Expand description
A Palette and a TableStyle, resolved into the styles a table draws
with.
The table model (wiki table-model): rows on the raised ground with a
stripe, the heading a sunken strip in bold secondary ink with the ordered
column brought up to primary, each cell part in the ink
CellPart::intent names, and selection carried by the background alone.
Where the palette has no colour for a role the table says it with a modifier: a bold heading, a reversed cursor row. Where the terminal cannot tell the strip from the ground, the heading is underlined as well, since the separation is what the strip is for.
Selection carries no foreground on purpose. A row can be red for a failed upload or green for a published item, and repainting its text on selection loses that on exactly the row the user is looking at.
Public for a caller assembling its own Table, which takes
stripe and selected from here.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.header: StyleThe heading row.
sorted: StyleThe heading of the column the table is ordered by.
sortable: StyleThe heading of a column that offers to reorder and is not doing it now.
The middle of three tones (wiki three-tone-convention): it answers a
press, so it is neither the emphasised thing nor the inert one.
value: StyleA cell that is text.
tokens: StyleA cell holding badges or chips. They carry their own tone, so this is what shows through the gaps rather than what paints them.
actions: StyleA cell holding controls. They carry their own ink, so this is what an unstyled run beside them takes.
link: StyleA cell whose value is itself a link: its row’s title, in the ink the values beside it take and with no underline, since the row is what activates.
selected: StyleThe row under the cursor, for a caller rendering with a
TableState.
ground: StyleWhat a row sits on.
stripe: StyleWhat every second row sits on, counting from the first body row.
Not drawn in a table holding a ColumnKind::Code column, which is
read as source: one row per line, where a stripe breaks the reading.
style: TableStyleThe metrics and marks.
Implementations§
Trait Implementations§
impl Copy for TableInk
impl Eq for TableInk
impl StructuralPartialEq for TableInk
Auto Trait Implementations§
impl Forget for TableInk
impl Freeze for TableInk
impl RefUnwindSafe for TableInk
impl Send for TableInk
impl Sync for TableInk
impl Unpin for TableInk
impl UnsafeUnpin for TableInk
impl UnwindSafe for TableInk
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more