duat_core::forms

Struct BuiltForm

Source
pub struct BuiltForm(/* private fields */);
Expand description

A convenience struct for Forms

This struct exists in order to have Form methods be initializers, while BuiltForm methods consume and return a BuiltForms

This is their only difference, everywhere else, they are functionally identical.

Implementations§

Source§

impl BuiltForm

Source

pub fn with(self, val: Color) -> Self

Colors the foreground of this Form

Source

pub fn on(self, val: Color) -> Self

Colors the background of this Form

Source

pub fn underline(self, val: Color) -> Self

Colors the underlining of this Form

Source

pub fn attribute(self, val: Attribute) -> Self

Applies an attribute to this Form

Source

pub fn reset(self) -> Self

Applies the reset atribute to this Form

Source

pub fn bold(self) -> Self

Applies the bold atribute to this Form

Source

pub fn underlined(self) -> Self

Applies the underlined atribute to this Form

Source

pub fn reverse(self) -> Self

Applies the reverse atribute to this Form

Source

pub fn dim(self) -> Self

Applies the dim atribute to this Form

Source

pub fn italic(self) -> Self

Applies the italic atribute to this Form

Source

pub fn negative(self) -> Self

Applies the negative atribute to this Form

Applies the slow_blink atribute to this Form

Applies the rapid_blink atribute to this Form

Source

pub fn hidden(self) -> Self

Applies the hidden atribute to this Form

Source

pub fn crossed_out(self) -> Self

Applies the crossed_out atribute to this Form

Source

pub fn black(self) -> Self

Turns the foreground of this Form black

Source

pub fn on_black(self) -> Self

Turns the background of this Form black

Source

pub fn underline_black(self) -> Self

Turns the underlining of this Form black

Do note that this feature may not be supported in all Uis.

Source

pub fn dark_grey(self) -> Self

Turns the foreground of this Form dark_grey

Source

pub fn on_dark_grey(self) -> Self

Turns the background of this Form dark_grey

Source

pub fn underline_dark_grey(self) -> Self

Turns the underlining of this Form dark_grey

Do note that this feature may not be supported in all Uis.

Source

pub fn red(self) -> Self

Turns the foreground of this Form red

Source

pub fn on_red(self) -> Self

Turns the background of this Form red

Source

pub fn underline_red(self) -> Self

Turns the underlining of this Form red

Do note that this feature may not be supported in all Uis.

Source

pub fn dark_red(self) -> Self

Turns the foreground of this Form dark_red

Source

pub fn on_dark_red(self) -> Self

Turns the background of this Form dark_red

Source

pub fn underline_dark_red(self) -> Self

Turns the underlining of this Form dark_red

Do note that this feature may not be supported in all Uis.

Source

pub fn green(self) -> Self

Turns the foreground of this Form green

Source

pub fn on_green(self) -> Self

Turns the background of this Form green

Source

pub fn underline_green(self) -> Self

Turns the underlining of this Form green

Do note that this feature may not be supported in all Uis.

Source

pub fn dark_green(self) -> Self

Turns the foreground of this Form dark_green

Source

pub fn on_dark_green(self) -> Self

Turns the background of this Form dark_green

Source

pub fn underline_dark_green(self) -> Self

Turns the underlining of this Form dark_green

Do note that this feature may not be supported in all Uis.

Source

pub fn yellow(self) -> Self

Turns the foreground of this Form yellow

Source

pub fn on_yellow(self) -> Self

Turns the background of this Form yellow

Source

pub fn underline_yellow(self) -> Self

Turns the underlining of this Form yellow

Do note that this feature may not be supported in all Uis.

Source

pub fn dark_yellow(self) -> Self

Turns the foreground of this Form dark_yellow

Source

pub fn on_dark_yellow(self) -> Self

Turns the background of this Form dark_yellow

Source

pub fn underline_dark_yellow(self) -> Self

Turns the underlining of this Form dark_yellow

Do note that this feature may not be supported in all Uis.

Source

pub fn blue(self) -> Self

Turns the foreground of this Form blue

Source

pub fn on_blue(self) -> Self

Turns the background of this Form blue

Source

pub fn underline_blue(self) -> Self

Turns the underlining of this Form blue

Do note that this feature may not be supported in all Uis.

Source

pub fn dark_blue(self) -> Self

Turns the foreground of this Form dark_blue

Source

pub fn on_dark_blue(self) -> Self

Turns the background of this Form dark_blue

Source

pub fn underline_dark_blue(self) -> Self

Turns the underlining of this Form dark_blue

Do note that this feature may not be supported in all Uis.

Source

pub fn magenta(self) -> Self

Turns the foreground of this Form magenta

Source

pub fn on_magenta(self) -> Self

Turns the background of this Form magenta

Source

pub fn underline_magenta(self) -> Self

Turns the underlining of this Form magenta

Do note that this feature may not be supported in all Uis.

Source

pub fn dark_magenta(self) -> Self

Turns the foreground of this Form dark_magenta

Source

pub fn on_dark_magenta(self) -> Self

Turns the background of this Form dark_magenta

Source

pub fn underline_dark_magenta(self) -> Self

Turns the underlining of this Form dark_magenta

Do note that this feature may not be supported in all Uis.

Source

pub fn cyan(self) -> Self

Turns the foreground of this Form cyan

Source

pub fn on_cyan(self) -> Self

Turns the background of this Form cyan

Source

pub fn underline_cyan(self) -> Self

Turns the underlining of this Form cyan

Do note that this feature may not be supported in all Uis.

Source

pub fn dark_cyan(self) -> Self

Turns the foreground of this Form dark_cyan

Source

pub fn on_dark_cyan(self) -> Self

Turns the background of this Form dark_cyan

Source

pub fn underline_dark_cyan(self) -> Self

Turns the underlining of this Form dark_cyan

Do note that this feature may not be supported in all Uis.

Source

pub fn white(self) -> Self

Turns the foreground of this Form white

Source

pub fn on_white(self) -> Self

Turns the background of this Form white

Source

pub fn underline_white(self) -> Self

Turns the underlining of this Form white

Do note that this feature may not be supported in all Uis.

Source

pub fn grey(self) -> Self

Turns the foreground of this Form grey

Source

pub fn on_grey(self) -> Self

Turns the background of this Form grey

Source

pub fn underline_grey(self) -> Self

Turns the underlining of this Form grey

Do note that this feature may not be supported in all Uis.

Source

pub fn finished(self) -> Self

Makes this Form finished

A finished style is one that cannot be superseeded. That is, if this style sets a foreground, while it is active, new styles may not modify the color of the foreground.

Source

pub fn double_underlined(self) -> Self

Applies the double_underlined attribute to this Form

Source

pub fn undercurled(self) -> Self

Applies the undercurled attribute to this Form

Source

pub fn underdashed(self) -> Self

Applies the underdashed attribute to this Form

Trait Implementations§

Source§

impl Deref for BuiltForm

Source§

type Target = Form

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl FormFmt for BuiltForm

Auto Trait Implementations§

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> 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, 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.