pub struct TextStyle {
pub font_size: LayoutUnit,
pub color: Color,
pub underline: bool,
pub background_color: Option<Color>,
}Expand description
Styling properties for a run of text.
Controls font size, color, underline, and optional background highlight (used for search matches, selections, etc.).
Fields§
§font_size: LayoutUnitFont size in logical pixels.
color: ColorText foreground color.
underline: boolWhether to draw an underline beneath the text.
background_color: Option<Color>Optional background highlight color for this run.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextStyle
impl<'de> Deserialize<'de> for TextStyle
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 StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe for TextStyle
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