[]Struct xterm_js_sys::xterm::Theme

pub struct Theme {
    pub(super) background: Option<Str>,
    pub(super) black: Option<Str>,
    pub(super) blue: Option<Str>,
    pub(super) bright_black: Option<Str>,
    pub(super) bright_blue: Option<Str>,
    pub(super) bright_cyan: Option<Str>,
    pub(super) bright_green: Option<Str>,
    pub(super) bright_magenta: Option<Str>,
    pub(super) bright_red: Option<Str>,
    pub(super) bright_white: Option<Str>,
    pub(super) bright_yellow: Option<Str>,
    pub(super) cursor: Option<Str>,
    pub(super) cursor_accent: Option<Str>,
    pub(super) cyan: Option<Str>,
    pub(super) foreground: Option<Str>,
    pub(super) green: Option<Str>,
    pub(super) magenta: Option<Str>,
    pub(super) red: Option<Str>,
    pub(super) selection: Option<Str>,
    pub(super) white: Option<Str>,
    pub(super) yellow: Option<Str>,
}

Contains colors to theme the terminal with.

(This is really an interface, but we just go and define our own type that satisfies the interface.)

Fields

background: Option<Str>

The default background color.

black: Option<Str>

ANSI black (eg. \x1b[30m).

blue: Option<Str>

ANSI blue (eg. \x1b[34m).

bright_black: Option<Str>

ANSI bright black (eg. \x1b[1;30m).

bright_blue: Option<Str>

ANSI bright blue (eg. \x1b[1;34m).

bright_cyan: Option<Str>

ANSI bright cyan (eg. \x1b[1;36m).

bright_green: Option<Str>

ANSI bright green (eg. \x1b[1;32m).

bright_magenta: Option<Str>

ANSI bright magenta (eg. \x1b[1;35m).

bright_red: Option<Str>

ANSI bright red (eg. \x1b[1;31m).

bright_white: Option<Str>

ANSI bright white (eg. \x1b[1;37m).

bright_yellow: Option<Str>

ANSI bright yellow (eg. \x1b[1;33m).

cursor: Option<Str>

The cursor color.

cursor_accent: Option<Str>

The accent color of the cursor (fg color for a block cursor).

cyan: Option<Str>

ANSI cyan (eg. \x1b[36m).

foreground: Option<Str>

The default foreground color.

green: Option<Str>

ANSI green (eg. \x1b[32m).

magenta: Option<Str>

ANSI magenta (eg. \x1b[35m).

red: Option<Str>

ANSI red (eg. \x1b[31m).

selection: Option<Str>

The selection background color (can be transparent).

white: Option<Str>

ANSI white (eg. \x1b[37m).

yellow: Option<Str>

ANSI yellow (eg. \x1b[33m).

Implementations

impl Theme[src]

#[must_use]pub const fn new(
    background: Option<Str>,
    black: Option<Str>,
    blue: Option<Str>,
    bright_black: Option<Str>,
    bright_blue: Option<Str>,
    bright_cyan: Option<Str>,
    bright_green: Option<Str>,
    bright_magenta: Option<Str>,
    bright_red: Option<Str>,
    bright_white: Option<Str>,
    bright_yellow: Option<Str>,
    cursor: Option<Str>,
    cursor_accent: Option<Str>,
    cyan: Option<Str>,
    foreground: Option<Str>,
    green: Option<Str>,
    magenta: Option<Str>,
    red: Option<Str>,
    selection: Option<Str>,
    white: Option<Str>,
    yellow: Option<Str>
) -> Self
[src]

Constructor.

impl Theme

#[must_use]pub fn background(&self) -> Option<Str>[src]

The default background color. Getter.

pub fn set_background(&mut self, background: Option<Str>)[src]

The default background color. Setter.

#[must_use]pub fn black(&self) -> Option<Str>[src]

ANSI black (eg. \x1b[30m). Getter.

pub fn set_black(&mut self, black: Option<Str>)[src]

ANSI black (eg. \x1b[30m). Setter.

#[must_use]pub fn blue(&self) -> Option<Str>[src]

ANSI blue (eg. \x1b[34m). Getter.

pub fn set_blue(&mut self, blue: Option<Str>)[src]

ANSI blue (eg. \x1b[34m). Setter.

#[must_use]pub fn bright_black(&self) -> Option<Str>[src]

ANSI bright black (eg. \x1b[1;30m). Getter.

pub fn set_bright_black(&mut self, bright_black: Option<Str>)[src]

ANSI bright black (eg. \x1b[1;30m). Setter.

#[must_use]pub fn bright_blue(&self) -> Option<Str>[src]

ANSI bright blue (eg. \x1b[1;34m). Getter.

pub fn set_bright_blue(&mut self, bright_blue: Option<Str>)[src]

ANSI bright blue (eg. \x1b[1;34m). Setter.

#[must_use]pub fn bright_cyan(&self) -> Option<Str>[src]

ANSI bright cyan (eg. \x1b[1;36m). Getter.

pub fn set_bright_cyan(&mut self, bright_cyan: Option<Str>)[src]

ANSI bright cyan (eg. \x1b[1;36m). Setter.

#[must_use]pub fn bright_green(&self) -> Option<Str>[src]

ANSI bright green (eg. \x1b[1;32m). Getter.

pub fn set_bright_green(&mut self, bright_green: Option<Str>)[src]

ANSI bright green (eg. \x1b[1;32m). Setter.

#[must_use]pub fn bright_magenta(&self) -> Option<Str>[src]

ANSI bright magenta (eg. \x1b[1;35m). Getter.

pub fn set_bright_magenta(&mut self, bright_magenta: Option<Str>)[src]

ANSI bright magenta (eg. \x1b[1;35m). Setter.

#[must_use]pub fn bright_red(&self) -> Option<Str>[src]

ANSI bright red (eg. \x1b[1;31m). Getter.

pub fn set_bright_red(&mut self, bright_red: Option<Str>)[src]

ANSI bright red (eg. \x1b[1;31m). Setter.

#[must_use]pub fn bright_white(&self) -> Option<Str>[src]

ANSI bright white (eg. \x1b[1;37m). Getter.

pub fn set_bright_white(&mut self, bright_white: Option<Str>)[src]

ANSI bright white (eg. \x1b[1;37m). Setter.

#[must_use]pub fn bright_yellow(&self) -> Option<Str>[src]

ANSI bright yellow (eg. \x1b[1;33m). Getter.

pub fn set_bright_yellow(&mut self, bright_yellow: Option<Str>)[src]

ANSI bright yellow (eg. \x1b[1;33m). Setter.

#[must_use]pub fn cursor(&self) -> Option<Str>[src]

The cursor color. Getter.

pub fn set_cursor(&mut self, cursor: Option<Str>)[src]

The cursor color. Setter.

#[must_use]pub fn cursor_accent(&self) -> Option<Str>[src]

The accent color of the cursor (fg color for a block cursor). Getter.

pub fn set_cursor_accent(&mut self, cursor_accent: Option<Str>)[src]

The accent color of the cursor (fg color for a block cursor). Setter.

#[must_use]pub fn cyan(&self) -> Option<Str>[src]

ANSI cyan (eg. \x1b[36m). Getter.

pub fn set_cyan(&mut self, cyan: Option<Str>)[src]

ANSI cyan (eg. \x1b[36m). Setter.

#[must_use]pub fn foreground(&self) -> Option<Str>[src]

The default foreground color. Getter.

pub fn set_foreground(&mut self, foreground: Option<Str>)[src]

The default foreground color. Setter.

#[must_use]pub fn green(&self) -> Option<Str>[src]

ANSI green (eg. \x1b[32m). Getter.

pub fn set_green(&mut self, green: Option<Str>)[src]

ANSI green (eg. \x1b[32m). Setter.

#[must_use]pub fn magenta(&self) -> Option<Str>[src]

ANSI magenta (eg. \x1b[35m). Getter.

pub fn set_magenta(&mut self, magenta: Option<Str>)[src]

ANSI magenta (eg. \x1b[35m). Setter.

#[must_use]pub fn red(&self) -> Option<Str>[src]

ANSI red (eg. \x1b[31m). Getter.

pub fn set_red(&mut self, red: Option<Str>)[src]

ANSI red (eg. \x1b[31m). Setter.

#[must_use]pub fn selection(&self) -> Option<Str>[src]

The selection background color (can be transparent). Getter.

pub fn set_selection(&mut self, selection: Option<Str>)[src]

The selection background color (can be transparent). Setter.

#[must_use]pub fn white(&self) -> Option<Str>[src]

ANSI white (eg. \x1b[37m). Getter.

pub fn set_white(&mut self, white: Option<Str>)[src]

ANSI white (eg. \x1b[37m). Setter.

#[must_use]pub fn yellow(&self) -> Option<Str>[src]

ANSI yellow (eg. \x1b[33m). Getter.

pub fn set_yellow(&mut self, yellow: Option<Str>)[src]

ANSI yellow (eg. \x1b[33m). Setter.

impl Theme[src]

#[must_use]pub const fn default() -> Self[src]

This is supported on feature="ext" only.

Constructor for Theme.

#[must_use]pub fn with_background<S: ToString>(self, background: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::background (accessible through Theme::background and Theme::set_background.

#[must_use]pub fn with_black<S: ToString>(self, black: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::black (accessible through Theme::black and Theme::set_black.

#[must_use]pub fn with_blue<S: ToString>(self, blue: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::blue (accessible through Theme::blue and Theme::set_blue.

#[must_use]pub fn with_bright_black<S: ToString>(self, bright_black: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::bright_black (accessible through Theme::bright_black and Theme::set_bright_black.

#[must_use]pub fn with_bright_blue<S: ToString>(self, bright_blue: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::bright_blue (accessible through Theme::bright_blue and Theme::set_bright_blue.

#[must_use]pub fn with_bright_cyan<S: ToString>(self, bright_cyan: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::bright_cyan (accessible through Theme::bright_cyan and Theme::set_bright_cyan.

#[must_use]pub fn with_bright_green<S: ToString>(self, bright_green: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::bright_green (accessible through Theme::bright_green and Theme::set_bright_green.

#[must_use]pub fn with_bright_magenta<S: ToString>(self, bright_magenta: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::bright_magenta (accessible through Theme::bright_magenta and Theme::set_bright_magenta.

#[must_use]pub fn with_bright_red<S: ToString>(self, bright_red: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::bright_red (accessible through Theme::bright_red and Theme::set_bright_red.

#[must_use]pub fn with_bright_white<S: ToString>(self, bright_white: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::bright_white (accessible through Theme::bright_white and Theme::set_bright_white.

#[must_use]pub fn with_bright_yellow<S: ToString>(self, bright_yellow: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::bright_yellow (accessible through Theme::bright_yellow and Theme::set_bright_yellow.

#[must_use]pub fn with_cursor<S: ToString>(self, cursor: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::cursor (accessible through Theme::cursor and Theme::set_cursor.

#[must_use]pub fn with_cursor_accent<S: ToString>(self, cursor_accent: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::cursor_accent (accessible through Theme::cursor_accent and Theme::set_cursor_accent.

#[must_use]pub fn with_cyan<S: ToString>(self, cyan: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::cyan (accessible through Theme::cyan and Theme::set_cyan.

#[must_use]pub fn with_foreground<S: ToString>(self, foreground: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::foreground (accessible through Theme::foreground and Theme::set_foreground.

#[must_use]pub fn with_green<S: ToString>(self, green: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::green (accessible through Theme::green and Theme::set_green.

#[must_use]pub fn with_magenta<S: ToString>(self, magenta: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::magenta (accessible through Theme::magenta and Theme::set_magenta.

#[must_use]pub fn with_red<S: ToString>(self, red: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::red (accessible through Theme::red and Theme::set_red.

#[must_use]pub fn with_selection<S: ToString>(self, selection: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::selection (accessible through Theme::selection and Theme::set_selection.

#[must_use]pub fn with_white<S: ToString>(self, white: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::white (accessible through Theme::white and Theme::set_white.

#[must_use]pub fn with_yellow<S: ToString>(self, yellow: S) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for Theme::yellow (accessible through Theme::yellow and Theme::set_yellow.

impl Theme[src]

#[must_use]pub fn nord() -> Self[src]

This is supported on feature="ext" only.

An xterm.js Theme based on the Nord color palette.

This is loosely based on the iTerm 2 Nord theme.

Trait Implementations

impl Clone for Theme

impl Debug for Theme

impl Default for Theme

impl Eq for Theme

impl From<Theme> for JsValue[src]

impl FromWasmAbi for Theme[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for Theme[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl OptionFromWasmAbi for Theme[src]

impl OptionIntoWasmAbi for Theme[src]

impl PartialEq<Theme> for Theme

impl RefFromWasmAbi for Theme[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

type Anchor = Ref<'static, Theme>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more

impl RefMutFromWasmAbi for Theme[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

type Anchor = RefMut<'static, Theme>

Same as RefFromWasmAbi::Anchor

impl StructuralEq for Theme

impl StructuralPartialEq for Theme

impl WasmDescribe for Theme[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.