[][src]Struct yocto::logger::Theme

pub struct Theme {
    pub error: Style,
    pub warn: Style,
    pub info: Style,
    pub debug: Style,
    pub trace: Style,
    pub module: Style,
}

The color scheme to use.

The default theme has:

  • ERROR printed in bold red.
  • WARN printed in yellow.
  • INFO printed in cyan.
  • DEBUG printed in gray.
  • TRACE printed in dimmed gray.
  • The module name is not styled.

Fields

error: Style

The style to give the "ERROR" string.

warn: Style

The style to give the "WARN" string.

info: Style

The style to give the "INFO" string.

debug: Style

The style to give the "DEBUG" string.

trace: Style

The style to give the "TRACE" string.

module: Style

The style to give the module name.

Methods

impl Theme[src]

pub fn empty() -> Theme[src]

Returns a theme that does not highlight anything.

pub fn paint_log_level(
    &self,
    level: LogLevel
) -> ANSIGenericString<'static, str>
[src]

Paints a log level with a theme.

Trait Implementations

impl Copy for Theme[src]

impl PartialEq<Theme> for Theme[src]

impl Clone for Theme[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for Theme[src]

impl Debug for Theme[src]

Auto Trait Implementations

impl Send for Theme

impl Sync for Theme

Blanket Implementations

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

type Owned = T

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

impl<T> Erased for T