pub struct TextMetrics {
pub width: f32,
pub height: f32,
pub lines: u32,
}Expand description
What a piece of text measures, in logical px at the current scale — the same numbers layout uses for a text node with that content and style, so a view can size a column to its widest label or pick a tier that fits without hand-tuned magic numbers.
Fields§
§width: f32§height: f32§lines: u32Lines after wrapping (capped by max_lines).
Implementations§
Trait Implementations§
Source§impl Clone for TextMetrics
impl Clone for TextMetrics
impl Copy for TextMetrics
Source§impl Debug for TextMetrics
impl Debug for TextMetrics
Source§impl Default for TextMetrics
impl Default for TextMetrics
Source§impl PartialEq for TextMetrics
impl PartialEq for TextMetrics
impl StructuralPartialEq for TextMetrics
Auto Trait Implementations§
impl Freeze for TextMetrics
impl RefUnwindSafe for TextMetrics
impl Send for TextMetrics
impl Sync for TextMetrics
impl Unpin for TextMetrics
impl UnsafeUnpin for TextMetrics
impl UnwindSafe for TextMetrics
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