#[non_exhaustive]pub enum TextStyleKind {
Bold,
Italic,
Code,
Strikethrough,
Underline,
Subscript,
Superscript,
Mark(Color),
TextColor(Color),
}Expand description
The kind of text formatting carried by a Event::StartTextStyle event.
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.
Bold
Bold formatting.
Italic
Italic formatting.
Code
Monospace/code formatting.
Strikethrough
Strikethrough formatting.
Underline
Underline formatting.
Subscript
Subscript formatting.
May be active simultaneously with TextStyleKind::Superscript by nesting;
writers that cannot represent both prefer Superscript.
Superscript
Superscript formatting.
May be active simultaneously with TextStyleKind::Subscript by nesting;
writers that cannot represent both prefer Superscript.
Mark(Color)
Highlight/mark color formatting. The variant carries the highlight color.
TextColor(Color)
Foreground (text) color. Carries an explicit RGB color.
Trait Implementations§
Source§impl Clone for TextStyleKind
impl Clone for TextStyleKind
Source§fn clone(&self) -> TextStyleKind
fn clone(&self) -> TextStyleKind
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 moreSource§impl Debug for TextStyleKind
impl Debug for TextStyleKind
impl Eq for TextStyleKind
Source§impl PartialEq for TextStyleKind
impl PartialEq for TextStyleKind
Source§fn eq(&self, other: &TextStyleKind) -> bool
fn eq(&self, other: &TextStyleKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TextStyleKind
Auto Trait Implementations§
impl Freeze for TextStyleKind
impl RefUnwindSafe for TextStyleKind
impl Send for TextStyleKind
impl Sync for TextStyleKind
impl Unpin for TextStyleKind
impl UnsafeUnpin for TextStyleKind
impl UnwindSafe for TextStyleKind
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