Skip to main content

Gui

Struct Gui 

Source
pub struct Gui {
    pub size: Option<f32>,
    pub font: Option<String>,
    pub terminal: Option<String>,
    pub background: Option<String>,
    pub foreground: Option<String>,
    pub editor: Option<String>,
    pub proportional: Option<bool>,
    pub inline_images: Option<bool>,
    pub html: Option<String>,
    pub colors: HashMap<String, String>,
}
Expand description

The window front end (rmut-egui). The terminal front end never reads these.

Fields§

§size: Option<f32>

Text size in points (14 when unset). Ctrl+= / Ctrl+- / Ctrl+0 zoom the whole window at runtime on top of this.

§font: Option<String>

Path to a .ttf/.otf file used as the window’s monospace face (egui’s built-in face when unset).

§terminal: Option<String>

The terminal emulator that hosts $EDITOR and ! commands ($TERMINAL, then foot/alacritty/kitty/xterm, when unset).

§background: Option<String>

The window canvas: what the text sits on and its default ink (named colors or #rrggbb; a dark gray on off-white unset).

§foreground: Option<String>§editor: Option<String>

“builtin” opens drafts in the window’s own text editor, “nvim” embeds Neovim in the window; anything else (“external”, the default) hosts $EDITOR in the terminal.

§proportional: Option<bool>

The message body in a proportional face; the index, headers and indented (preformatted) lines stay monospace.

§inline_images: Option<bool>

image/* parts drawn in the message body under their [-- Type: image/... --] markers (on unless turned off).

§html: Option<String>

The window’s own say over [pager] html (the Preferences checkbox writes it here), so the terminal can keep raw while the window renders, or the other way around.

§colors: HashMap<String, String>

Window-only overrides of [colors], same keys and values (plus #rrggbb): the window can wear its own palette while the terminal keeps the shared one.

Trait Implementations§

Source§

impl Clone for Gui

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Gui

Source§

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

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

impl Default for Gui

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Gui
where Gui: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Gui

§

impl RefUnwindSafe for Gui

§

impl Send for Gui

§

impl Sync for Gui

§

impl Unpin for Gui

§

impl UnsafeUnpin for Gui

§

impl UnwindSafe for Gui

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.