Struct config::Theme

source ·
#[non_exhaustive]
pub struct Theme {
Show 22 fields pub character_vertical_spacing: String, pub color_action_break: Color, pub color_action_drop: Color, pub color_action_edit: Color, pub color_action_exec: Color, pub color_action_fixup: Color, pub color_action_pick: Color, pub color_action_reword: Color, pub color_action_squash: Color, pub color_action_label: Color, pub color_action_reset: Color, pub color_action_merge: Color, pub color_action_update_ref: Color, pub color_background: Color, pub color_diff_add: Color, pub color_diff_change: Color, pub color_diff_context: Color, pub color_diff_remove: Color, pub color_diff_whitespace: Color, pub color_foreground: Color, pub color_indicator: Color, pub color_selected_background: Color,
}
Expand description

Represents the theme configuration options.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§character_vertical_spacing: String

The character for filling vertical spacing.

§color_action_break: Color

The color for the break action.

§color_action_drop: Color

The color for the drop action.

§color_action_edit: Color

The color for the edit action.

§color_action_exec: Color

The color for the exec action.

§color_action_fixup: Color

The color for the fixup action.

§color_action_pick: Color

The color for the pick action.

§color_action_reword: Color

The color for the reword action.

§color_action_squash: Color

The color for the squash action.

§color_action_label: Color

The color for the label action.

§color_action_reset: Color

The color for the reset action.

§color_action_merge: Color

The color for the merge action.

§color_action_update_ref: Color

The color for the update-ref action.

§color_background: Color

The color for the background.

§color_diff_add: Color

The color for added lines in a diff.

§color_diff_change: Color

The color for changed lines in a diff.

§color_diff_context: Color

The color for context lines in a diff.

§color_diff_remove: Color

The color for removed lines in a diff.

§color_diff_whitespace: Color

The color for whitespace characters in a diff.

§color_foreground: Color

The color for the standard text.

§color_indicator: Color

The color for indicator text.

§color_selected_background: Color

The background color for selected lines.

Implementations§

source§

impl Theme

source

pub fn new() -> Self

Create a new configuration with default values.

Trait Implementations§

source§

impl Clone for Theme

source§

fn clone(&self) -> Theme

Returns a copy 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 Debug for Theme

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl TryFrom<&Config> for Theme

§

type Error = ConfigError

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

fn try_from(config: &Config) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.