pub enum Effect {
Show 13 variants
Bold,
Faint,
Italic,
SolidUnderline,
CurlyUnderline,
DottedUnderline,
DashedUnderline,
Blink,
Reverse,
Conceal,
Strikethrough,
DoubleUnderline,
Overline,
}Expand description
An enumeration of all supported text styling effects.
Variants§
Bold
Bold styling.
Faint
Faint styling.
Italic
Italic styling.
SolidUnderline
Solid underline styling.
CurlyUnderline
Curly underline styling.
DottedUnderline
Dotted underline styling.
DashedUnderline
Dashed underline styling.
Blink
Blink styling.
Reverse
Reverse video styling.
Conceal
Conceal (hidden) styling.
Strikethrough
Strikethrough styling.
DoubleUnderline
Double underline styling.
Overline
Overline styling.
Implementations§
Source§impl Effect
impl Effect
Sourcepub const UNDERLINE: Effect = Effect::SolidUnderline
pub const UNDERLINE: Effect = Effect::SolidUnderline
An alias for Effect::SolidUnderline.
Source§impl Effect
impl Effect
Sourcepub fn underline(self) -> Style
pub fn underline(self) -> Style
An alias for Self::solid_underline().
Sourcepub fn solid_underline(self) -> Style
pub fn solid_underline(self) -> Style
Sets the solid underline effect.
Sourcepub fn curly_underline(self) -> Style
pub fn curly_underline(self) -> Style
Sets the curly underline effect.
Sourcepub fn dotted_underline(self) -> Style
pub fn dotted_underline(self) -> Style
Sets the dotted underline effect.
Sourcepub fn dashed_underline(self) -> Style
pub fn dashed_underline(self) -> Style
Sets the dashed underline effect.
Sourcepub fn strikethrough(self) -> Style
pub fn strikethrough(self) -> Style
Sets the strikethrough effect.
Sourcepub fn double_underline(self) -> Style
pub fn double_underline(self) -> Style
Sets the double underline effect.
Sourcepub fn underline_effect(self, underline_effect: UnderlineEffect) -> Style
pub fn underline_effect(self, underline_effect: UnderlineEffect) -> Style
Sets the underline effect.
Sourcepub fn underline_color(self, color: impl Into<Color>) -> Style
pub fn underline_color(self, color: impl Into<Color>) -> Style
Sets the underline color.
Sourcepub fn color(self, targeted_color: impl Into<TargetedColor>) -> Style
pub fn color(self, targeted_color: impl Into<TargetedColor>) -> Style
Sets the given color in a target.
Sourcepub fn add(self, element: impl StylingElement<Style>) -> Style
pub fn add(self, element: impl StylingElement<Style>) -> Style
Adds the given element to the style.
Sourcepub fn applied_to<C: Display>(self, content: C) -> Styled<C>
pub fn applied_to<C: Display>(self, content: C) -> Styled<C>
Applies the styling to the given content, returning a Styled<C> instance.