Struct tutil::crayon::Style
[−]
[src]
pub struct Style { /* fields omitted */ }
A collection of properties that are used to format a string.
Methods
impl Style
[src]
fn new() -> Style
Creates a new Style
without any formatting.
fn paint<'a, S>(self, string: S) -> StyledString<'a> where
S: Into<Cow<'a, str>>,
S: Into<Cow<'a, str>>,
Applies the Style
to a string, yielding a StyledString
.
fn foreground(&self, color: Color) -> Style
Sets the foreground to the given colour.
fn background(&self, color: Color) -> Style
Sets the background to the given colour.
fn bold(&self) -> Style
Applies the 'bold' property.
fn dimmed(&self) -> Style
Applies the 'dimmed' property.
fn italic(&self) -> Style
Applies the 'italic' property.
fn underline(&self) -> Style
Applies the 'underline' property.
fn blink(&self) -> Style
Applies the 'blink' property.
fn reverse(&self) -> Style
Applies the 'reverse' property.
Applies the 'hidden' property.
Trait Implementations
impl Debug 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 Copy for Style
[src]
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 !=
.