pub struct TableCell { /* private fields */ }Expand description
One cell: text, optionally with a glyph before it and a colour.
Implementations§
Source§impl TableCell
impl TableCell
Sourcepub fn icon(self, glyph: impl Into<Glyph>, color: Option<&str>) -> Self
pub fn icon(self, glyph: impl Into<Glyph>, color: Option<&str>) -> Self
A glyph drawn before the text with one space between them: an icon key such as "dot"
or Glyph::key, or a Glyph::literal the application looked up itself.
With color it is drawn in that theme colour, for a glyph that carries meaning such as a
status dot in "success". Without, it is muted, quieter than the text, and takes the
row’s text colour while the row is selected. A narrow column cuts the text with … and
always keeps the glyph and its space.
Sourcepub fn color(self, token: impl Into<String>) -> Self
pub fn color(self, token: impl Into<String>) -> Self
Draws the text in theme colour token, e.g. "success" next to a status icon.
Sourcepub fn role(self, role: impl Into<String>) -> Self
pub fn role(self, role: impl Into<String>) -> Self
Draws the text in typography role role, as Text::role does, such
as "faint" for a value that matters less. Unlike a color, a role steps
aside on the selected row, whose text takes the selection’s colour like the table’s own
quiet marks, so the row reads as one.
Trait Implementations§
impl Eq for TableCell
impl StructuralPartialEq for TableCell
Auto Trait Implementations§
impl Freeze for TableCell
impl RefUnwindSafe for TableCell
impl Send for TableCell
impl Sync for TableCell
impl Unpin for TableCell
impl UnsafeUnpin for TableCell
impl UnwindSafe for TableCell
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