Skip to main content

ColorConfigBuilder

Struct ColorConfigBuilder 

Source
pub struct ColorConfigBuilder { /* private fields */ }
Expand description

颜色配置构建器

Implementations§

Source§

impl ColorConfigBuilder

Source

pub fn new() -> Self

创建新的颜色配置构建器

Source

pub fn enabled(self, enabled: bool) -> Self

启用/禁用颜色

Source

pub fn theme(self, theme: ColorTheme) -> Self

设置主题

Source

pub fn error_color<S: Into<String>>(self, color: S) -> Self

设置错误级别颜色

Source

pub fn warn_color<S: Into<String>>(self, color: S) -> Self

设置警告级别颜色

Source

pub fn info_color<S: Into<String>>(self, color: S) -> Self

设置信息级别颜色

Source

pub fn debug_color<S: Into<String>>(self, color: S) -> Self

设置调试级别颜色

Source

pub fn trace_color<S: Into<String>>(self, color: S) -> Self

设置跟踪级别颜色

Source

pub fn keyword_color<K: Into<String>, C: Into<String>>( self, keyword: K, color: C, ) -> Self

添加关键词颜色

Source

pub fn timestamp_color<S: Into<String>>(self, color: S) -> Self

设置时间戳颜色

Source

pub fn filename_color<S: Into<String>>(self, color: S) -> Self

设置文件名颜色

Source

pub fn line_number_color<S: Into<String>>(self, color: S) -> Self

设置行号颜色

Source

pub fn build(self) -> ColorConfig

构建颜色配置

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

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.