pub struct CellStyle {
pub fg: Option<Color>,
pub bold: bool,
pub reverse: bool,
pub faint: bool,
}Expand description
Visual attributes that can vary per cell in our footer. Kept minimal on purpose: footer uses fg color, bold, and reverse-video (for the palette’s selected row). Extending this to bg / underline / italic is a future concern — adding fields is the mechanical part, but every field widens the diff equality surface and the SGR state machine’s emit path, so we don’t preemptively carry what we don’t use.
Fields§
§fg: Option<Color>Foreground colour via crossterm SGR. None = terminal default
foreground (emitted as \x1b[39m by the serialiser).
bold: boolSGR bold (\x1b[1m / \x1b[22m).
reverse: boolSGR reverse video (\x1b[7m / \x1b[27m). Used for the
highlighted menu row.
faint: boolSGR faint / decreased intensity (\x1b[2m). Renders the current
fg at ~50% intensity — terminal-theme-aware muting that adapts
to both light and dark schemes (unlike a fixed DarkGrey which
vanishes on some palettes). Toggled off via SGR 22, which is the
shared “normal intensity” reset for both bold and faint, so the
transition path goes through full reset when faint→off.
Trait Implementations§
impl Eq for CellStyle
impl StructuralPartialEq for CellStyle
Auto Trait Implementations§
impl Freeze for CellStyle
impl RefUnwindSafe for CellStyle
impl Send for CellStyle
impl Sync for CellStyle
impl Unpin for CellStyle
impl UnsafeUnpin for CellStyle
impl UnwindSafe for CellStyle
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§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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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