Skip to main content

with_surface

Function with_surface 

Source
pub fn with_surface<R: Resource, S: 'static, T>(
    root: &mut dyn Any,
    visit: impl FnOnce(&mut S) -> T,
) -> Option<T>
Expand description

Visit the surface of type S the root of a resource app of R shows: for a test, or a host that mounted the app, reaching the surface between frames (App::with_component_root lends the root of a mounted one). None when root is not such a root or shows no S.