pub struct TerminalLineAttrs {
pub foreground: Option<Color>,
pub background: Option<Color>,
pub bold: bool,
pub dim: bool,
}Expand description
Optional per-line colors and emphasis flags.
foreground overrides the kind color and background paints the complete
row. dim multiplies foreground alpha by 0.72; bold is retained metadata
but is not currently interpreted by the renderer.
§Examples
use ailloli_ui_core::Color;
use ailloli_ui_widgets::controls::TerminalLineAttrs;
let attrs = TerminalLineAttrs { foreground: Some(Color::WHITE), bold: true, ..Default::default() };
assert!(attrs.bold);Fields§
§foreground: Option<Color>Optional text-color override.
background: Option<Color>Optional full-row background.
bold: boolReserved emphasis flag; currently not rendered.
dim: boolWhether to multiply foreground alpha by 0.72.
Trait Implementations§
Source§impl Clone for TerminalLineAttrs
impl Clone for TerminalLineAttrs
Source§fn clone(&self) -> TerminalLineAttrs
fn clone(&self) -> TerminalLineAttrs
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TerminalLineAttrs
impl Debug for TerminalLineAttrs
Source§impl Default for TerminalLineAttrs
impl Default for TerminalLineAttrs
Source§fn default() -> TerminalLineAttrs
fn default() -> TerminalLineAttrs
Returns the “default value” for a type. Read more
Source§impl PartialEq for TerminalLineAttrs
impl PartialEq for TerminalLineAttrs
impl Copy for TerminalLineAttrs
impl StructuralPartialEq for TerminalLineAttrs
Auto Trait Implementations§
impl Freeze for TerminalLineAttrs
impl RefUnwindSafe for TerminalLineAttrs
impl Send for TerminalLineAttrs
impl Sync for TerminalLineAttrs
impl Unpin for TerminalLineAttrs
impl UnwindSafe for TerminalLineAttrs
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.