Struct pretty_assertions::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]
fn new() -> Style
[src]
Creates a new Style with no differences.
fn paint<'a, I, S>(self, input: I) -> ANSIGenericString<'a, S> where
I: Into<Cow<'a, S>>,
S: 'a + ToOwned + ?Sized,
<S as ToOwned>::Owned: Debug,
[src]
I: Into<Cow<'a, S>>,
S: 'a + ToOwned + ?Sized,
<S as ToOwned>::Owned: Debug,
Paints the given text with this colour, returning an ANSI string.
fn prefix(self) -> Prefix
[src]
The prefix for this style.
fn suffix(self) -> Suffix
[src]
The suffix for this style.
fn infix(self, other: Style) -> Infix
[src]
The infix between this style and another.
fn bold(&self) -> Style
[src]
Returns a Style with the bold property set.
fn dimmed(&self) -> Style
[src]
Returns a Style with the dimmed property set.
fn italic(&self) -> Style
[src]
Returns a Style with the italic property set.
fn underline(&self) -> Style
[src]
Returns a Style with the underline property set.
fn blink(&self) -> Style
[src]
Returns a Style with the blink property set.
fn reverse(&self) -> Style
[src]
Returns a Style with the reverse property set.
[src]
Returns a Style with the hidden property set.
fn strikethrough(&self) -> Style
[src]
Returns a Style with the hidden property set.
fn fg(&self, foreground: Colour) -> Style
[src]
Returns a Style with the foreground colour property set.
fn on(&self, background: Colour) -> Style
[src]
Returns a Style with the background colour property set.
Trait Implementations
impl Copy for Style
[src]
impl Clone for Style
[src]
impl PartialEq<Style> for Style
[src]
impl Debug for Style
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.