Struct ansi_term::Style
[−]
[src]
pub struct Style { /* fields omitted */ }
A style is a collection of properties that can format a string using ANSI escape codes.
Methods
impl Style
[src]
pub fn new() -> Style
[src]
Creates a new Style with no differences.
pub fn paint<'a, I, S: 'a + ToOwned + ?Sized>(
self,
input: I
) -> ANSIGenericString<'a, S> where
I: Into<Cow<'a, S>>,
<S as ToOwned>::Owned: Debug,
[src]
self,
input: I
) -> ANSIGenericString<'a, S> where
I: Into<Cow<'a, S>>,
<S as ToOwned>::Owned: Debug,
Paints the given text with this colour, returning an ANSI string.
pub fn prefix(self) -> Prefix
[src]
The prefix for this style.
pub fn suffix(self) -> Suffix
[src]
The suffix for this style.
pub fn infix(self, other: Style) -> Infix
[src]
The infix between this style and another.
pub fn bold(&self) -> Style
[src]
Returns a Style with the bold property set.
pub fn dimmed(&self) -> Style
[src]
Returns a Style with the dimmed property set.
pub fn italic(&self) -> Style
[src]
Returns a Style with the italic property set.
pub fn underline(&self) -> Style
[src]
Returns a Style with the underline property set.
pub fn blink(&self) -> Style
[src]
Returns a Style with the blink property set.
pub fn reverse(&self) -> Style
[src]
Returns a Style with the reverse property set.
[src]
Returns a Style with the hidden property set.
pub fn strikethrough(&self) -> Style
[src]
Returns a Style with the hidden property set.
pub fn fg(&self, foreground: Colour) -> Style
[src]
Returns a Style with the foreground colour property set.
pub fn on(&self, background: Colour) -> Style
[src]
Returns a Style with the background colour property set.
Trait Implementations
impl PartialEq for Style
[src]
fn eq(&self, __arg_0: &Style) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Style) -> bool
[src]
This method tests for !=
.
impl Clone for Style
[src]
fn clone(&self) -> Style
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more