Enum term_painter::Attr
source · pub enum Attr {
Plain,
Bold,
Dim,
Underline,
Blink,
Reverse,
Secure,
}
Expand description
Lists possible attributes. It implements ToStyle
so it’s possible to call
ToStyle
’s methods directly on a Attr
variant like:
println!("{}", Attr::Bold.fg(Color::Red).paint("Red and bold"));
It is not guaranteed that the local terminal supports all of those
formatting options. As already mentioned in the module documentation, you
should use term
directly to check the terminal’s capabilities.
For more information about enum variants, see term::Attr
Documentation.
Variants§
Trait Implementations§
source§impl PartialEq for Attr
impl PartialEq for Attr
source§impl ToStyle for Attr
impl ToStyle for Attr
source§fn to_style(self) -> Style
fn to_style(self) -> Style
Returns a Style with default values and the self
attribute enabled.
source§fn to_mapped_style<F>(self, func: F) -> Style
fn to_mapped_style<F>(self, func: F) -> Style
Convenience method for modifying the style before it’s returned.
source§fn not_underline(self) -> Style
fn not_underline(self) -> Style
Removes underline-attribute.
impl Copy for Attr
impl Eq for Attr
impl StructuralPartialEq for Attr
Auto Trait Implementations§
impl RefUnwindSafe for Attr
impl Send for Attr
impl Sync for Attr
impl Unpin for Attr
impl UnwindSafe for Attr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more