pub enum Style {
Bold,
Dim,
Italic,
Underline,
Blink,
Reverse,
Hidden,
Strikethrough,
Reset,
}Expand description
Represents ANSI text formatting styles.
Variants§
Bold
Makes the text bold or increased intensity.
Dim
Decreases the intensity of the text.
Italic
Makes the text italic (not supported in all terminals).
Underline
Underlines the text (not supported in all terminals).
Blink
Makes the text blink (not supported in all terminals).
Reverse
Reverses the foreground and background colors.
Hidden
Hides the text (not supported in all terminals).
Strikethrough
Puts a line through the text (not supported in all terminals).
Reset
Resets all styles to default.
Implementations§
Trait Implementations§
impl Copy for Style
impl Eq for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> StyleExt for Twhere
T: Display,
impl<T> StyleExt for Twhere
T: Display,
Source§fn color(self, color: Color) -> StyledText<T>
fn color(self, color: Color) -> StyledText<T>
Applies a foreground color to the text.
Source§fn bg(self, color: Color) -> StyledText<T>
fn bg(self, color: Color) -> StyledText<T>
Applies a background color to the text.
Source§fn black(self) -> StyledText<T>
fn black(self) -> StyledText<T>
Formats the text with a black foreground. Read more
Source§fn red(self) -> StyledText<T>
fn red(self) -> StyledText<T>
Formats the text with a red foreground. Read more
Source§fn green(self) -> StyledText<T>
fn green(self) -> StyledText<T>
Formats the text with a green foreground. Read more
Source§fn yellow(self) -> StyledText<T>
fn yellow(self) -> StyledText<T>
Formats the text with a yellow foreground. Read more
Source§fn blue(self) -> StyledText<T>
fn blue(self) -> StyledText<T>
Formats the text with a blue foreground. Read more
Source§fn magenta(self) -> StyledText<T>
fn magenta(self) -> StyledText<T>
Formats the text with a magenta foreground. Read more
Source§fn cyan(self) -> StyledText<T>
fn cyan(self) -> StyledText<T>
Formats the text with a cyan foreground. Read more
Source§fn white(self) -> StyledText<T>
fn white(self) -> StyledText<T>
Formats the text with a white foreground. Read more
Source§fn rgb(self, r: u8, g: u8, b: u8) -> StyledText<T>
fn rgb(self, r: u8, g: u8, b: u8) -> StyledText<T>
Formats the text with a red foreground. Read more
Source§fn bold(self) -> StyledText<T>
fn bold(self) -> StyledText<T>
Formats the text with a bold style. Read more
Source§fn italic(self) -> StyledText<T>
fn italic(self) -> StyledText<T>
Formats the text with a italic style. Read more
Source§fn underline(self) -> StyledText<T>
fn underline(self) -> StyledText<T>
Formats the text with a underline style. Read more
Source§fn blink(self) -> StyledText<T>
fn blink(self) -> StyledText<T>
Formats the text with a blink style. Read more
Source§fn strikethrough(self) -> StyledText<T>
fn strikethrough(self) -> StyledText<T>
Formats the text with a strikethrough style. Read more
Source§fn dim(self) -> StyledText<T>
fn dim(self) -> StyledText<T>
Formats the text with a dim style. Read more
Source§fn reset(self) -> StyledText<T>
fn reset(self) -> StyledText<T>
Resets the text styles. Read more