Struct crossterm::style::ContentStyle [−][src]
pub struct ContentStyle { pub foreground_color: Option<Color>, pub background_color: Option<Color>, pub attributes: Attributes, }
Expand description
The style that can be put on content.
Fields
foreground_color: Option<Color>
The foreground color.
background_color: Option<Color>
The background color.
attributes: Attributes
List of attributes.
Implementations
Creates a StyledContent
by applying the style to the given val
.
Creates a new ContentStyle
.
Trait Implementations
Performs the conversion.
Performs the conversion.
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type Styled = Self
type Styled = Self
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 RefUnwindSafe for ContentStyle
impl Send for ContentStyle
impl Sync for ContentStyle
impl Unpin for ContentStyle
impl UnwindSafe for ContentStyle
Blanket Implementations
Mutably borrows from an owned value. Read more