Struct crossterm::style::StyledContent [−][src]
pub struct StyledContent<D: Display> { /* fields omitted */ }
Expand description
The style with the content to be styled.
Examples
use crossterm::style::{style, Color, Attribute, Stylize}; let styled = "Hello there" .with(Color::Yellow) .on(Color::Blue) .attribute(Attribute::Bold); println!("{}", styled);
Implementations
Creates a new StyledContent
.
Returns the style.
Returns a mutable reference to the style, so that it can be further manipulated
Trait Implementations
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type Styled = StyledContent<D>
type Styled = StyledContent<D>
This type with styles applied.
Applies the Underlined
attribute to the text.
Applies the SlowBlink
attribute to the text.
Applies the RapidBlink
attribute to the text.
Applies the Hidden
attribute to the text.
Applies the CrossedOut
attribute to the text.
Sets the background color to DarkGrey
.
Sets the background color to DarkRed
.
Sets the foreground color to DarkGreen
.
Sets the background color to DarkGreen
.
Sets the foreground color to DarkYellow
.
Sets the background color to DarkYellow
.
Sets the background color to DarkBlue
.
Sets the background color to Magenta
.
Sets the foreground color to DarkMagenta
.
Sets the background color to DarkMagenta
.
Sets the background color to DarkCyan
.
Auto Trait Implementations
impl<D> RefUnwindSafe for StyledContent<D> where
D: RefUnwindSafe,
impl<D> Send for StyledContent<D> where
D: Send,
impl<D> Sync for StyledContent<D> where
D: Sync,
impl<D> Unpin for StyledContent<D> where
D: Unpin,
impl<D> UnwindSafe for StyledContent<D> where
D: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more