StdoutFmt

Trait StdoutFmt 

Source
pub trait StdoutFmt: StreamAwareFmt {
    // Provided methods
    fn fg<C: Into<Option<Color>>>(self, color: C) -> Foreground<Self> { ... }
    fn bg<C: Into<Option<Color>>>(self, color: C) -> Background<Self> { ... }
}
Expand description

A trait used to add formatting attributes to displayable items intended to be written to stdout.

Attributes specified through this trait are not composable (i.e: the behaviour of two nested attributes each with a conflicting attribute is left unspecified).

Provided Methods§

Source

fn fg<C: Into<Option<Color>>>(self, color: C) -> Foreground<Self>

Give this value the specified foreground colour, when color is enabled for stdout.

Source

fn bg<C: Into<Option<Color>>>(self, color: C) -> Background<Self>

Give this value the specified background colour, when color is enabled for stdout.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§