Struct indicatif::Styled
[−]
[src]
pub struct Styled<D> { /* fields omitted */ }
A formatting wrapper that can be styled for a terminal.
Methods
impl<D> Styled<D>
[src]
fn force_styling(self, value: bool) -> Styled<D>
Forces styling on or off.
This overrides the detection from clicolors-control
.
fn fg(self, color: Color) -> Styled<D>
Sets a foreground color.
fn bg(self, color: Color) -> Styled<D>
Sets a background color.
fn style(self, style: Style) -> Styled<D>
Adds a style.
fn black(self) -> Styled<D>
fn red(self) -> Styled<D>
fn green(self) -> Styled<D>
fn yellow(self) -> Styled<D>
fn blue(self) -> Styled<D>
fn magenta(self) -> Styled<D>
fn cyan(self) -> Styled<D>
fn white(self) -> Styled<D>
fn on_black(self) -> Styled<D>
fn on_red(self) -> Styled<D>
fn on_green(self) -> Styled<D>
fn on_yellow(self) -> Styled<D>
fn on_blue(self) -> Styled<D>
fn on_magenta(self) -> Styled<D>
fn on_cyan(self) -> Styled<D>
fn on_white(self) -> Styled<D>
fn bold(self) -> Styled<D>
fn dim(self) -> Styled<D>
fn underlined(self) -> Styled<D>
fn blink(self) -> Styled<D>
fn reverse(self) -> Styled<D>
fn from_dotted_str(self, s: &str) -> Styled<D>
Applies styles from a dotted string.
Effectively the string is split at each dot and then the
terms in between are applied. For instance red.on_blue
will
create a string that is red on blue background. Unknown terms
are ignored.
Trait Implementations
impl<D: Clone> Clone for Styled<D>
[src]
fn clone(&self) -> Styled<D>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more