pub struct NoopTheme;Expand description
A no-op theme that returns text unchanged. Useful for testing components without needing a real theme.
Trait Implementations§
impl Copy for NoopTheme
Source§impl Theme for NoopTheme
impl Theme for NoopTheme
Source§fn fg(&self, _color: &str, text: &str) -> String
fn fg(&self, _color: &str, text: &str) -> String
Apply a foreground color to text.
color is a color name (e.g., “accent”, “text”, “success”, “error”, “muted”).Source§fn italic(&self, text: &str) -> String
fn italic(&self, text: &str) -> String
Apply italic styling (used for thinking blocks, matching pi).
Source§fn inverse(&self, text: &str) -> String
fn inverse(&self, text: &str) -> String
Apply reverse/inverse video styling (used for intra-line diff highlighting).
Source§fn fg_key(&self, key: ThemeKey, text: &str) -> String
fn fg_key(&self, key: ThemeKey, text: &str) -> String
Apply a foreground color from a
ThemeKey.Source§fn bg_key(&self, key: ThemeKey, text: &str) -> String
fn bg_key(&self, key: ThemeKey, text: &str) -> String
Apply a background color from a
ThemeKey.Source§fn fg_ansi(&self, _color: &str) -> &str
fn fg_ansi(&self, _color: &str) -> &str
Return the ANSI escape code for a named color (without text).
Default implementation returns empty string — override in concrete themes.
Source§fn fg_ansi_key(&self, key: ThemeKey) -> &str
fn fg_ansi_key(&self, key: ThemeKey) -> &str
Return the ANSI escape code for a
ThemeKey color (without text).Auto Trait Implementations§
impl Freeze for NoopTheme
impl RefUnwindSafe for NoopTheme
impl Send for NoopTheme
impl Sync for NoopTheme
impl Unpin for NoopTheme
impl UnsafeUnpin for NoopTheme
impl UnwindSafe for NoopTheme
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