pub struct TextRun {
pub text: String,
pub font_data: Arc<[u8]>,
pub style: TextStyle,
pub decoration: Decoration,
}Expand description
A styled span of text within a paragraph.
Pairs a text slice with the font bytes to shape it and a TextStyle.
Used by multi-style (“rich text”) layout where a single paragraph mixes
fonts, sizes, and decorations.
Fields§
§text: StringThe text content of this run.
font_data: Arc<[u8]>Font bytes used to shape and rasterise this run.
style: TextStyleRendering style for this run.
decoration: DecorationOptional text decorations for this run.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextRun
impl RefUnwindSafe for TextRun
impl Send for TextRun
impl Sync for TextRun
impl Unpin for TextRun
impl UnsafeUnpin for TextRun
impl UnwindSafe for TextRun
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