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<'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.
Returns a Style with the hidden property set.
fn strikethrough(&self) -> Style
Returns a Style with the hidden property set.
fn fg(&self, foreground: Colour) -> Style
Returns a Style with the foreground colour property set.
fn on(&self, background: Colour) -> Style
Returns a Style with the background colour property set.
Trait Implementations
impl Debug for Style
[src]
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 !=
.