#[non_exhaustive]pub enum UnderlineStyle {
Straight,
Double,
Curly,
Dotted,
Dashed,
}Expand description
Underline rendering style, emitted as the CSI 4:Nm subparameter.
Straight is the plain SGR 4 default. The other variants require a
terminal that supports the Kitty/VTE underline-style extension
(Kitty, WezTerm, foot, recent VTE-based terminals); terminals without
support fall back to a plain underline.
§Example
use slt::{Color, Style, UnderlineStyle};
// A red curly "error" underline, like a spell-checker squiggle.
let err = Style::new()
.underline_style(UnderlineStyle::Curly)
.underline_color(Color::Red);
assert_eq!(err.underline_style, UnderlineStyle::Curly);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Straight
Plain straight underline (CSI 4:1m, the SGR 4 default).
Double
Double underline (CSI 4:2m).
Curly
Curly / “squiggly” underline (CSI 4:3m), commonly used for errors.
Dotted
Dotted underline (CSI 4:4m).
Dashed
Dashed underline (CSI 4:5m).
Trait Implementations§
Source§impl Clone for UnderlineStyle
impl Clone for UnderlineStyle
Source§fn clone(&self) -> UnderlineStyle
fn clone(&self) -> UnderlineStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UnderlineStyle
Source§impl Debug for UnderlineStyle
impl Debug for UnderlineStyle
Source§impl Default for UnderlineStyle
impl Default for UnderlineStyle
Source§fn default() -> UnderlineStyle
fn default() -> UnderlineStyle
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UnderlineStyle
impl<'de> Deserialize<'de> for UnderlineStyle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for UnderlineStyle
Source§impl Hash for UnderlineStyle
impl Hash for UnderlineStyle
Source§impl PartialEq for UnderlineStyle
impl PartialEq for UnderlineStyle
Source§fn eq(&self, other: &UnderlineStyle) -> bool
fn eq(&self, other: &UnderlineStyle) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UnderlineStyle
impl Serialize for UnderlineStyle
impl StructuralPartialEq for UnderlineStyle
Auto Trait Implementations§
impl Freeze for UnderlineStyle
impl RefUnwindSafe for UnderlineStyle
impl Send for UnderlineStyle
impl Sync for UnderlineStyle
impl Unpin for UnderlineStyle
impl UnsafeUnpin for UnderlineStyle
impl UnwindSafe for UnderlineStyle
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.