pub struct Style { /* fields omitted */ }
Expand description
A way to style output, by setting flags within this struct and then outputting it with (“… {} …”, style)
use better_term::Style;
let style = Style::default().underline().bold();
println!("{}Hello, world!", style);
Creates a new Style with default values
this will overwrite previous styles with default values
Set the output to be italic
Set the output to be underlined
Set the output to blink
This is not supported in most terminals
Inverts the current colors (bg and fg) through ansi (does not change fg and bg values)
hides the text (it’s still there, just hidden.)
sets the text to be strike-through
Performs copy-assignment from source
. Read more
Get the default values for a Style
Formats the value using the given formatter. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.