Enum term_painter::Attr [] [src]

pub enum Attr {
    Plain,
    Bold,
    Dim,
    Underline,
    Blink,
    Reverse,
    Secure,
}

Lists possible attributes. It implements ToStyle so it's possible to call ToStyle's methods directly on a Attr variant like:


println!("{}", Attr::Bold.fg(Color::Red).paint("Red and bold"));

It is not guaranteed that the local terminal supports all of those formatting options. As already mentioned in the module documentation, you should use term directly to check the terminal's capabilities.

For more information about enum variants, see term::Attr Documentation.

Variants

Just default style

Trait Implementations

impl Debug for Attr
[src]

Formats the value using the given formatter.

impl Copy for Attr
[src]

impl Clone for Attr
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Attr
[src]

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

This method tests for !=.

impl Eq for Attr
[src]

impl ToStyle for Attr
[src]

Returns a Style with default values and the self attribute enabled.

Convenience method for modifying the style before it's returned.

Sets the foreground (text) color.

Sets the background color.

Makes the text bold.

Dim mode.

Underlines the text.

Removes underline-attribute.

Underlines the text.

Underlines the text.

Secure mode.

Wraps the style specified in self and something of arbitrary type into a Painted. When Painted is printed it will print the arbitrary something with the given style. Read more

Executes the given function, applying the style information before calling it and resetting after it finished. Read more