Skip to main content

measured_element

Function measured_element 

Source
pub fn measured_element(
    id: impl Into<ElementId>,
    child: impl IntoElement,
    listener: impl Fn(&ElementId, Bounds<Pixels>, Option<&GlobalElementId>, &mut Window, &mut App) + 'static,
) -> MeasuredElement
Expand description

Builds a wrapper that reports an element’s layout-pass bounds during prepaint.

This is intentionally toolkit-neutral: callers provide the semantic identifier and decide how to store or interpret the reported bounds.