pub struct AppContextTextMeasurer;Expand description
Measures draw-scope text against the app’s fonts.
Every call lands in super::measure_text, which is the same entry point
the Text composable’s layout uses and is backed by the app context’s
metrics cache — so measuring an unchanged string every frame is a hash
lookup, not a shaping pass.
Implementations§
Source§impl AppContextTextMeasurer
impl AppContextTextMeasurer
A shared measurer to hand to
DrawScopeDefault::with_text_measurer.
Trait Implementations§
Source§impl Clone for AppContextTextMeasurer
impl Clone for AppContextTextMeasurer
Source§fn clone(&self) -> AppContextTextMeasurer
fn clone(&self) -> AppContextTextMeasurer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AppContextTextMeasurer
Source§impl Debug for AppContextTextMeasurer
impl Debug for AppContextTextMeasurer
Source§impl Default for AppContextTextMeasurer
impl Default for AppContextTextMeasurer
Source§fn default() -> AppContextTextMeasurer
fn default() -> AppContextTextMeasurer
Returns the “default value” for a type. Read more
Source§impl DrawTextMeasurer for AppContextTextMeasurer
impl DrawTextMeasurer for AppContextTextMeasurer
fn measure_text(&self, text: &str, style: &DrawTextStyle) -> TextMeasurement
Auto Trait Implementations§
impl Freeze for AppContextTextMeasurer
impl RefUnwindSafe for AppContextTextMeasurer
impl Send for AppContextTextMeasurer
impl Sync for AppContextTextMeasurer
impl Unpin for AppContextTextMeasurer
impl UnsafeUnpin for AppContextTextMeasurer
impl UnwindSafe for AppContextTextMeasurer
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