pub struct Theme {
pub ascii: bool,
pub tier: ColorTier,
}Expand description
Resolved color + glyph capability for this run.
Fields§
§ascii: boolUse the ASCII glyph tier (no Unicode box/spinner/marks).
tier: ColorTierThe color depth to emit at.
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn detect(no_color_flag: bool, ascii_flag: bool) -> Theme
pub fn detect(no_color_flag: bool, ascii_flag: bool) -> Theme
Resolve from the flags + environment. NO_COLOR (any value) or
--no-color disables color; --ascii or a non-UTF-8 locale selects the
ASCII glyph tier. The color depth comes from COLORTERM + TERM.
Sourcepub fn paints_background(&self) -> bool
pub fn paints_background(&self) -> bool
Whether the tier paints a real background (truecolor / 256). Basic and plain tiers use the terminal’s own background.
Sourcepub fn background_prefix(&self) -> String
pub fn background_prefix(&self) -> String
The escape that sets the charcoal background for a frame, or empty when the tier does not paint a background.
Sourcepub fn amber_gradient(&self, row: usize, s: &str) -> String
pub fn amber_gradient(&self, row: usize, s: &str) -> String
Color one row of the block wordmark with an amber shade, lighter at the top and deeper at the bottom (a subtle vertical gradient). The 256 and basic tiers use the single amber accent; plain is untouched.
Sourcepub fn selection_bar(&self, content: &str, width: usize) -> String
pub fn selection_bar(&self, content: &str, width: usize) -> String
A full-width solid amber selection bar with dark text, width display
columns wide. In the basic and plain tiers there is no background to
draw, so the row degrades to an accented marker plus a bold label (the
caller pads it to width). content is plain text (no embedded escapes).
Sourcepub fn glyph_fail(&self) -> &'static str
pub fn glyph_fail(&self) -> &'static str
The failure mark (✗ / x).
Sourcepub fn glyph_pending(&self) -> &'static str
pub fn glyph_pending(&self) -> &'static str
The not-started mark (• / .).
Sourcepub fn dot_filled(&self) -> &'static str
pub fn dot_filled(&self) -> &'static str
A filled radio / progress dot.
Sourcepub fn box_checked(&self) -> &'static str
pub fn box_checked(&self) -> &'static str
A filled checkbox mark (checklist on).
Sourcepub fn box_unchecked(&self) -> &'static str
pub fn box_unchecked(&self) -> &'static str
An empty checkbox mark (checklist off).
Trait Implementations§
Auto Trait Implementations§
impl Forget for Theme
impl Freeze for Theme
impl Move for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnsafeUnpin for Theme
impl UnwindSafe for Theme
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<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