Enum color_string::Font

source ·
pub enum Font {
Show 47 variants Reset, Bold, RBold, Underline, RUnderline, Italic, RItalic, Reverse, RReverse, Delete, RDelete, Black, RBlack, Red, RRed, Green, RGreen, Yellow, RYellow, Blue, RBlue, Purple, RPurple, Cyan, RCyan, Grey, RGrey, BgBlack, RBgBlack, BgRed, RBgRed, BgGreen, RBgGreen, BgYellow, RBgYellow, BgBlue, RBgBlue, BgPurple, RBgPurple, BgCyan, RBgCyan, BgGrey, RBgGrey, Color(u8, u8, u8), RColor(u8, u8, u8), BgColor(u8, u8, u8), RBgColor(u8, u8, u8),
}

Variants§

§

Reset

重置样式

§

Bold

字体加粗

§

RBold

§

Underline

下划线

§

RUnderline

§

Italic

斜体

§

RItalic

§

Reverse

反色(前景色背景色交换)

§

RReverse

§

Delete

删除线

§

RDelete

§

Black

黑色字体

§

RBlack

§

Red

红色字体

§

RRed

§

Green

绿色字体

§

RGreen

§

Yellow

黄色字体

§

RYellow

§

Blue

蓝色字体

§

RBlue

§

Purple

紫色字体

§

RPurple

§

Cyan

青色字体

§

RCyan

§

Grey

灰色字体

§

RGrey

§

BgBlack

黑色背景

§

RBgBlack

§

BgRed

红色背景

§

RBgRed

§

BgGreen

绿色背景

§

RBgGreen

§

BgYellow

黄色背景

§

RBgYellow

§

BgBlue

蓝色背景

§

RBgBlue

§

BgPurple

紫色背景

§

RBgPurple

§

BgCyan

青色背景

§

RBgCyan

§

BgGrey

灰色背景

§

RBgGrey

§

Color(u8, u8, u8)

字体颜色 RGB

§

RColor(u8, u8, u8)

§

BgColor(u8, u8, u8)

背景颜色 RGB

§

RBgColor(u8, u8, u8)

Implementations§

source§

impl Font

source

pub fn as_str(&self) -> Cow<'static, str>

Trait Implementations§

source§

impl Display for Font

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Font

§

impl Send for Font

§

impl Sync for Font

§

impl Unpin for Font

§

impl UnwindSafe for Font

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> Colored for Twhere T: Display + ?Sized,

source§

fn bold(&self) -> String

source§

fn underline(&self) -> String

source§

fn italic(&self) -> String

source§

fn reverse(&self) -> String

source§

fn delete(&self) -> String

source§

fn black(&self) -> String

source§

fn red(&self) -> String

source§

fn green(&self) -> String

source§

fn yellow(&self) -> String

source§

fn blue(&self) -> String

source§

fn purple(&self) -> String

source§

fn cyan(&self) -> String

source§

fn grey(&self) -> String

source§

fn bg_black(&self) -> String

source§

fn bg_red(&self) -> String

source§

fn bg_green(&self) -> String

source§

fn bg_yellow(&self) -> String

source§

fn bg_blue(&self) -> String

source§

fn bg_purple(&self) -> String

source§

fn bg_cyan(&self) -> String

source§

fn bg_grey(&self) -> String

source§

fn color(&self, r: u8, g: u8, b: u8) -> String

source§

fn bg_color(&self, r: u8, g: u8, b: u8) -> String

source§

fn fonts(&self, fonts: String) -> String

Examples 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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.