Struct ansi_term::Style
[−]
[src]
pub struct Style { // some fields omitted }
A style is a collection of properties that can format a string using ANSI escape codes.
Methods
impl Style
fn new() -> Style
Creates a new Style with no differences.
fn paint<'a, S>(self, input: S) -> ANSIString<'a> where S: Into<Cow<'a, str>>
Paints the given text with this colour, returning an ANSI string.
fn bold(&self) -> Style
Returns a Style with the bold property set.
fn dimmed(&self) -> Style
Returns a Style with the dimmed property set.
fn italic(&self) -> Style
Returns a Style with the italic property set.
fn underline(&self) -> Style
Returns a Style with the underline property set.
fn blink(&self) -> Style
Returns a Style with the blink property set.
fn reverse(&self) -> Style
Returns a Style with the reverse property set.
fn hidden(&self) -> Style
Returns a Style with the hidden property set.
fn on(&self, background: Colour) -> Style
Returns a Style with the background colour property set.