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
[src]

fn new() -> Style

Creates a new Style with no differences.

fn paint(self, input: &str) -> ANSIString

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 underline(&self) -> Style

Returns a Style with the underline property set.

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.

Trait Implementations

impl Debug for Style
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Copy for Style
[src]

impl Clone for Style
[src]

fn clone(&self) -> Style

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

impl PartialEq for Style
[src]

fn eq(&self, __arg_0: &Style) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Style) -> bool

This method tests for !=.

impl Default for Style
[src]

fn default() -> Style

Returns the "default value" for a type. Read more