pub struct SpanStyle<'a> {
pub font: Option<FontId>,
pub size: Option<f32>,
pub line_height: Option<LineHeight>,
pub weight: Option<u16>,
pub stretch: Option<u16>,
pub style: Option<FontStyle>,
pub color: Option<Color>,
pub settings: Option<FontSettings<'a>>,
}Expand description
style overrides for a rich text span
Fields§
§font: Option<FontId>§size: Option<f32>§line_height: Option<LineHeight>backends without per-span line height use the base style’s
weight: Option<u16>§stretch: Option<u16>§style: Option<FontStyle>§color: Option<Color>§settings: Option<FontSettings<'a>>Implementations§
Source§impl<'a> SpanStyle<'a>
impl<'a> SpanStyle<'a>
Sourcepub fn line_height(self, value: impl Into<Option<LineHeight>>) -> Self
pub fn line_height(self, value: impl Into<Option<LineHeight>>) -> Self
sets Self::line_height
Sourcepub fn settings(self, value: impl Into<Option<FontSettings<'a>>>) -> Self
pub fn settings(self, value: impl Into<Option<FontSettings<'a>>>) -> Self
sets Self::settings
Trait Implementations§
impl<'a> Copy for SpanStyle<'a>
impl<'a> StructuralPartialEq for SpanStyle<'a>
Auto Trait Implementations§
impl<'a> Forget for SpanStyle<'a>
impl<'a> Freeze for SpanStyle<'a>
impl<'a> Move for SpanStyle<'a>
impl<'a> RefUnwindSafe for SpanStyle<'a>
impl<'a> Send for SpanStyle<'a>
impl<'a> Sync for SpanStyle<'a>
impl<'a> Unpin for SpanStyle<'a>
impl<'a> UnsafeUnpin for SpanStyle<'a>
impl<'a> UnwindSafe for SpanStyle<'a>
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