Skip to main content

Measure

Trait Measure 

Source
pub trait Measure {
    // Required method
    fn text_width(&self, text: &str, size: f32, bold: bool) -> f32;
}
Expand description

Measures text width (the UI passes real font metrics; tests use a fixed-width approximation).

Required Methods§

Source

fn text_width(&self, text: &str, size: f32, bold: bool) -> f32

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§