pub struct TextDecoration {
pub underline: bool,
pub overline: bool,
pub strikethrough: bool,
}Expand description
A text’s decoration lines, which combine with one another. They have no effect on measurement: the text’s geometry does not change, and the lines are drawn by the backend from the baseline metrics.
Fields§
§underline: boolUnderline, below the baseline.
overline: boolA line above the text.
strikethrough: boolStruck through, at the middle of the x-height.
Implementations§
Source§impl TextDecoration
impl TextDecoration
Sourcepub const NONE: TextDecoration
pub const NONE: TextDecoration
No decoration at all.
Sourcepub const UNDERLINE: TextDecoration
pub const UNDERLINE: TextDecoration
Underline only.
Sourcepub const OVERLINE: TextDecoration
pub const OVERLINE: TextDecoration
Overline only.
Sourcepub const STRIKETHROUGH: TextDecoration
pub const STRIKETHROUGH: TextDecoration
Strikethrough only.
Sourcepub const fn combine(self, other: TextDecoration) -> TextDecoration
pub const fn combine(self, other: TextDecoration) -> TextDecoration
Combines two decorations — the union of their lines.
Trait Implementations§
Source§impl Clone for TextDecoration
impl Clone for TextDecoration
Source§fn clone(&self) -> TextDecoration
fn clone(&self) -> TextDecoration
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 TextDecoration
Source§impl Debug for TextDecoration
impl Debug for TextDecoration
Source§impl Default for TextDecoration
impl Default for TextDecoration
Source§fn default() -> TextDecoration
fn default() -> TextDecoration
Returns the “default value” for a type. Read more
impl Eq for TextDecoration
Source§impl PartialEq for TextDecoration
impl PartialEq for TextDecoration
impl StructuralPartialEq for TextDecoration
Auto Trait Implementations§
impl Freeze for TextDecoration
impl RefUnwindSafe for TextDecoration
impl Send for TextDecoration
impl Sync for TextDecoration
impl Unpin for TextDecoration
impl UnsafeUnpin for TextDecoration
impl UnwindSafe for TextDecoration
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