pub struct TextRun {
pub text: Arc<str>,
pub weight: u16,
pub italic: bool,
pub color: Color,
}Expand description
One inline run of a rich-text paragraph: a slice of text with its own weight, slant, and colour. Paragraph
metrics (font size, line height, wrapping, alignment) live on the DrawCommand::RichText base style,
so a run overrides only what varies inline (bold, italic, a link’s colour).
Fields§
§text: Arc<str>§weight: u16§italic: bool§color: ColorTrait Implementations§
impl StructuralPartialEq for TextRun
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