pub struct TextRun<'a> {
pub line_i: usize,
pub text: &'a str,
pub rtl: bool,
pub glyphs: Cow<'a, [LayoutGlyph]>,
pub line_y: f32,
pub line_top: f32,
pub line_height: f32,
pub line_w: f32,
/* private fields */
}Expand description
A line of text as shown: cosmic-text’s layout run, less the blank that cosmic-text 0.19 starts an elided line with when the line before it wrapped at a space.
Fields§
§line_i: usizeThe index of the buffer line it is part of.
text: &'a strThat buffer line’s text, which glyphs index into.
rtl: boolWhether the paragraph runs right to left.
glyphs: Cow<'a, [LayoutGlyph]>The glyphs to draw, left to right, from the text’s origin.
line_y: f32From the text’s top to the baseline.
line_top: f32From the text’s top to the line’s top.
line_height: f32The line’s height.
line_w: f32The line’s width.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for TextRun<'a>
impl<'a> Freeze for TextRun<'a>
impl<'a> Move for TextRun<'a>
impl<'a> RefUnwindSafe for TextRun<'a>
impl<'a> Send for TextRun<'a>
impl<'a> Sync for TextRun<'a>
impl<'a> Unpin for TextRun<'a>
impl<'a> UnsafeUnpin for TextRun<'a>
impl<'a> UnwindSafe for TextRun<'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