pub struct RabTheme {
pub name: String,
/* private fields */
}Expand description
The concrete theme used by the rab UI. Wraps resolved ANSI escape codes for foregrounds, backgrounds, and text styling.
Fields§
§name: StringImplementations§
Source§impl RabTheme
impl RabTheme
Sourcepub fn from_config(config: &ThemeConfig, mode: ColorMode) -> Self
pub fn from_config(config: &ThemeConfig, mode: ColorMode) -> Self
Build a RabTheme from a ThemeConfig.
Sourcepub fn fg_ansi(&self, color: &str) -> &str
pub fn fg_ansi(&self, color: &str) -> &str
Get the ANSI foreground escape code for a color name.
Sourcepub fn bg_ansi(&self, color: &str) -> &str
pub fn bg_ansi(&self, color: &str) -> &str
Get the ANSI background escape code for a color name.
Sourcepub fn strikethrough(&self, text: &str) -> String
pub fn strikethrough(&self, text: &str) -> String
Apply strikethrough styling.
Sourcepub fn color_mode(&self) -> ColorMode
pub fn color_mode(&self) -> ColorMode
Get the color mode.
Sourcepub fn text_color(&self, text: &str) -> String
pub fn text_color(&self, text: &str) -> String
Apply text foreground color.
Sourcepub fn user_msg_bg(&self, text: &str) -> String
pub fn user_msg_bg(&self, text: &str) -> String
Apply user message background.
Sourcepub fn thinking_bg(&self, text: &str) -> String
pub fn thinking_bg(&self, text: &str) -> String
Apply thinking block background.
Sourcepub fn bold_accent(&self, text: &str) -> String
pub fn bold_accent(&self, text: &str) -> String
Bold + accent foreground.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RabTheme
impl RefUnwindSafe for RabTheme
impl Send for RabTheme
impl Sync for RabTheme
impl Unpin for RabTheme
impl UnsafeUnpin for RabTheme
impl UnwindSafe for RabTheme
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