pub struct TextMetrics {
pub positions: Vec<f32>,
pub byte_offsets: Vec<usize>,
}Fields§
§positions: Vec<f32>positions[i] = advance up to the i-th grapheme (len == graphemes + 1)
byte_offsets: Vec<usize>byte_offsets[i] = byte index of the i-th grapheme (last == text.len())
Auto Trait Implementations§
impl Forget for TextMetrics
impl Freeze for TextMetrics
impl Move for TextMetrics
impl RefUnwindSafe for TextMetrics
impl Send for TextMetricswhere
RawVecInner: Send,
impl Sync for TextMetricswhere
RawVecInner: Sync,
impl Unpin for TextMetrics
impl UnsafeUnpin for TextMetricswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<f32>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
impl UnwindSafe for TextMetricswhere
RawVecInner: UnwindSafe,
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