pub struct DeterministicTextMeasurer;Expand description
Deterministic zero-dependency text measurer guaranteeing identical wrapping across all target platforms.
Implementations§
impl DeterministicTextMeasurer
This impl block contains no public items.
Fast internal typography measurement helpers for DeterministicTextMeasurer.
Trait Implementations§
Source§impl Clone for DeterministicTextMeasurer
impl Clone for DeterministicTextMeasurer
Source§fn clone(&self) -> DeterministicTextMeasurer
fn clone(&self) -> DeterministicTextMeasurer
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 DeterministicTextMeasurer
Source§impl Debug for DeterministicTextMeasurer
impl Debug for DeterministicTextMeasurer
Source§impl Default for DeterministicTextMeasurer
impl Default for DeterministicTextMeasurer
Source§fn default() -> DeterministicTextMeasurer
fn default() -> DeterministicTextMeasurer
Returns the “default value” for a type. Read more
impl Eq for DeterministicTextMeasurer
Source§impl Hash for DeterministicTextMeasurer
impl Hash for DeterministicTextMeasurer
Source§impl Ord for DeterministicTextMeasurer
impl Ord for DeterministicTextMeasurer
Source§fn cmp(&self, other: &DeterministicTextMeasurer) -> Ordering
fn cmp(&self, other: &DeterministicTextMeasurer) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DeterministicTextMeasurer
impl PartialOrd for DeterministicTextMeasurer
impl StructuralPartialEq for DeterministicTextMeasurer
Source§impl TextMeasurer for DeterministicTextMeasurer
Deterministic cross-platform TextMeasurer implementation.
impl TextMeasurer for DeterministicTextMeasurer
Deterministic cross-platform TextMeasurer implementation.
Source§fn measure(
&self,
text: &str,
style: TextStyle,
max_width: Option<f32>,
) -> TextLayoutResult
fn measure( &self, text: &str, style: TextStyle, max_width: Option<f32>, ) -> TextLayoutResult
Source§fn measure_size(
&self,
text: &str,
style: TextStyle,
max_width: Option<f32>,
) -> Size
fn measure_size( &self, text: &str, style: TextStyle, max_width: Option<f32>, ) -> Size
Measures only the aggregate bounding box of text under style with zero heap allocations.
§Arguments
&Self- Measurer instance.&str- Input UTF-8 string.TextStyle- Active typography style.Option<f32>- Optional maximum available width.
§Returns
Size- Exact aggregate bounding box matchingmeasure(text, style, max_width).get_size().
Auto Trait Implementations§
impl Forget for DeterministicTextMeasurer
impl Freeze for DeterministicTextMeasurer
impl Move for DeterministicTextMeasurer
impl RefUnwindSafe for DeterministicTextMeasurer
impl Send for DeterministicTextMeasurer
impl Sync for DeterministicTextMeasurer
impl Unpin for DeterministicTextMeasurer
impl UnsafeUnpin for DeterministicTextMeasurer
impl UnwindSafe for DeterministicTextMeasurer
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