Struct ptree::style::Style [−][src]
pub struct Style { pub foreground: Option<Color>, pub background: Option<Color>, pub bold: bool, pub dimmed: bool, pub italic: bool, pub underline: bool, pub blink: bool, pub reverse: bool, pub hidden: bool, pub strikethrough: bool, }
Terminal output style
Fields
foreground: Option<Color>
The style's foreground colour, if it has one.
background: Option<Color>
The style's background colour, if it has one.
bold: bool
Whether this style is bold.
dimmed: bool
Whether this style is dimmed.
italic: bool
Whether this style is italic.
underline: bool
Whether this style is underlined.
blink: bool
Whether this style is blinking.
reverse: bool
Whether this style has reverse colours.
Whether this style is hidden.
strikethrough: bool
Whether this style is struckthrough.
Methods
impl Style
[src]
impl Style
pub fn paint(
&self,
input: impl Display
) -> impl Display
[src]
pub fn paint(
&self,
input: impl Display
) -> impl Display
Paints input
according to this style.
If the "ansi"
feature is enabled, this function uses
ansi_term
to style text.
If the "ansi"
feature is disabled, this function
always returns the output unchanged.
Trait Implementations
impl Clone for Style
[src]
impl Clone for Style
fn clone(&self) -> Style
[src]
fn clone(&self) -> Style
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Style
[src]
impl Debug for Style
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Style
[src]
impl PartialEq for Style
fn eq(&self, other: &Style) -> bool
[src]
fn eq(&self, other: &Style) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Style) -> bool
[src]
fn ne(&self, other: &Style) -> bool
This method tests for !=
.
impl Eq for Style
[src]
impl Eq for Style
impl Default for Style
[src]
impl Default for Style