pub trait TextMeasure {
// Required method
fn measure_text(
&self,
widget_id: WidgetId,
known_dimensions: Size<Option<f32>>,
available_space: Size<AvailableSpace>,
) -> Option<Size<f32>>;
}Expand description
Measures text for the shared layout pass (TEXT-004).
Backend inherits this trait so the shared layout can ask a lane
for a widget’s natural text dimensions without widening the backend
contract itself.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".