pub enum UnderlineEffect {
Solid,
Curly,
Dotted,
Dashed,
Double,
}Expand description
An enumeration of all supported underline effects.
The values correspond to a subset of Effect.
Variants§
Solid
Solid underline styling.
Curly
Curly underline styling.
Dotted
Dotted underline styling.
Dashed
Dashed underline styling.
Double
Double underline styling.
Implementations§
Source§impl UnderlineEffect
impl UnderlineEffect
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.
Trait Implementations§
Source§impl Clone for UnderlineEffect
impl Clone for UnderlineEffect
Source§fn clone(&self) -> UnderlineEffect
fn clone(&self) -> UnderlineEffect
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnderlineEffect
impl Debug for UnderlineEffect
Source§impl Default for UnderlineEffect
impl Default for UnderlineEffect
Source§fn default() -> UnderlineEffect
fn default() -> UnderlineEffect
Returns the “default value” for a type. Read more
Source§impl Display for UnderlineEffect
impl Display for UnderlineEffect
Source§impl From<UnderlineEffect> for Effect
impl From<UnderlineEffect> for Effect
Source§fn from(value: UnderlineEffect) -> Self
fn from(value: UnderlineEffect) -> Self
Converts to this type from the input type.
Source§impl From<UnderlineEffect> for Style
impl From<UnderlineEffect> for Style
Source§fn from(value: UnderlineEffect) -> Self
fn from(value: UnderlineEffect) -> Self
Converts to this type from the input type.
Source§impl Hash for UnderlineEffect
impl Hash for UnderlineEffect
Source§impl PartialEq for UnderlineEffect
impl PartialEq for UnderlineEffect
Source§impl Sequence for UnderlineEffect
impl Sequence for UnderlineEffect
Source§impl StylingAttribute<Style> for UnderlineEffect
impl StylingAttribute<Style> for UnderlineEffect
Source§impl<C: Display> StylingAttribute<Styled<C>> for UnderlineEffect
impl<C: Display> StylingAttribute<Styled<C>> for UnderlineEffect
Source§impl StylingElement<Style> for UnderlineEffect
impl StylingElement<Style> for UnderlineEffect
Source§impl<C: Display> StylingElement<Styled<C>> for UnderlineEffect
impl<C: Display> StylingElement<Styled<C>> for UnderlineEffect
impl Copy for UnderlineEffect
impl Eq for UnderlineEffect
impl StructuralPartialEq for UnderlineEffect
Auto Trait Implementations§
impl Freeze for UnderlineEffect
impl RefUnwindSafe for UnderlineEffect
impl Send for UnderlineEffect
impl Sync for UnderlineEffect
impl Unpin for UnderlineEffect
impl UnwindSafe for UnderlineEffect
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