Theme

Struct Theme 

Source
pub struct Theme {
Show 59 fields pub background: Style, pub text: Style, pub border: Style, pub border_focused: Style, pub title_separator: Style, pub title_indicator_connected: Style, pub title_indicator_disconnected: Style, pub title_text: Style, pub user_prefix: Style, pub system_prefix: Style, pub assistant_prefix: Style, pub timestamp: Style, pub cursor: Style, pub bold: Modifier, pub italic: Modifier, pub strikethrough: Modifier, pub inline_code: Style, pub link_text: Style, pub link_url: Style, pub heading_1: Style, pub heading_2: Style, pub heading_3: Style, pub heading_4: Style, pub code_block: Style, pub table_header: Style, pub table_cell: Style, pub table_border: Style, pub tool_header: Style, pub tool_executing: Style, pub tool_completed: Style, pub tool_failed: Style, pub input_border: Style, pub input_text: Style, pub prompt: Style, pub throbber_label: Style, pub throbber_spinner: Style, pub status_help: Style, pub status_model: Style, pub popup_border: Style, pub popup_header: Style, pub popup_item: Style, pub popup_item_selected: Style, pub popup_item_desc: Style, pub popup_item_desc_selected: Style, pub popup_selected_bg: Style, pub popup_empty: Style, pub help_text: Style, pub muted_text: Style, pub focused_text: Style, pub focus_indicator: Style, pub selected: Style, pub unselected: Style, pub button_confirm: Style, pub button_confirm_focused: Style, pub button_cancel: Style, pub button_cancel_focused: Style, pub warning: Style, pub category: Style, pub resource: Style,
}
Expand description

Complete theme definition for the TUI.

Contains styles for all UI elements including chat messages, markdown formatting, tool execution, input areas, popups, and interactive panels.

Fields§

§background: Style

Background style for the entire UI.

§text: Style

Default text style.

§border: Style§border_focused: Style§title_separator: Style§title_indicator_connected: Style§title_indicator_disconnected: Style§title_text: Style§user_prefix: Style§system_prefix: Style§assistant_prefix: Style§timestamp: Style§cursor: Style§bold: Modifier§italic: Modifier§strikethrough: Modifier§inline_code: Style§link_text: Style§link_url: Style§heading_1: Style§heading_2: Style§heading_3: Style§heading_4: Style§code_block: Style§table_header: Style§table_cell: Style§table_border: Style§tool_header: Style§tool_executing: Style§tool_completed: Style§tool_failed: Style§input_border: Style§input_text: Style§prompt: Style§throbber_label: Style§throbber_spinner: Style§status_help: Style§status_model: Style§popup_border: Style§popup_header: Style§popup_item: Style§popup_item_selected: Style§popup_item_desc: Style§popup_item_desc_selected: Style§popup_selected_bg: Style§popup_empty: Style§help_text: Style§muted_text: Style§focused_text: Style§focus_indicator: Style§selected: Style§unselected: Style§button_confirm: Style§button_confirm_focused: Style§button_cancel: Style§button_cancel_focused: Style§warning: Style§category: Style§resource: Style

Implementations§

Source§

impl Theme

Source

pub fn bold(&self) -> Modifier

Source

pub fn italic(&self) -> Modifier

Source

pub fn strikethrough(&self) -> Modifier

Source

pub fn inline_code(&self) -> Style

Source

pub fn heading_1(&self) -> Style

Source

pub fn heading_2(&self) -> Style

Source

pub fn heading_3(&self) -> Style

Source

pub fn heading_4(&self) -> Style

Source

pub fn code_block(&self) -> Style

Source

pub fn assistant_prefix(&self) -> Style

Source

pub fn table_header(&self) -> Style

Source

pub fn table_cell(&self) -> Style

Source

pub fn table_border(&self) -> Style

Source

pub fn border(&self) -> Style

Source

pub fn border_focused(&self) -> Style

Source

pub fn popup_border(&self) -> Style

Source

pub fn popup_header(&self) -> Style

Source

pub fn popup_item(&self) -> Style

Source

pub fn popup_item_selected(&self) -> Style

Source

pub fn popup_item_desc(&self) -> Style

Source

pub fn popup_item_desc_selected(&self) -> Style

Source

pub fn popup_selected_bg(&self) -> Style

Source

pub fn popup_empty(&self) -> Style

Source

pub fn status_help(&self) -> Style

Source

pub fn background(&self) -> Style

Source

pub fn text(&self) -> Style

Source

pub fn cursor(&self) -> Style

Source

pub fn help_text(&self) -> Style

Source

pub fn muted_text(&self) -> Style

Source

pub fn focused_text(&self) -> Style

Source

pub fn focus_indicator(&self) -> Style

Source

pub fn selected(&self) -> Style

Source

pub fn unselected(&self) -> Style

Source

pub fn button_confirm(&self) -> Style

Source

pub fn button_confirm_focused(&self) -> Style

Source

pub fn button_cancel(&self) -> Style

Source

pub fn button_cancel_focused(&self) -> Style

Source

pub fn warning(&self) -> Style

Source

pub fn category(&self) -> Style

Source

pub fn resource(&self) -> Style

Trait Implementations§

Source§

impl Clone for Theme

Source§

fn clone(&self) -> Theme

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Theme

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Theme

§

impl RefUnwindSafe for Theme

§

impl Send for Theme

§

impl Sync for Theme

§

impl Unpin for Theme

§

impl UnwindSafe for Theme

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more