Skip to main content

with_surface

Function with_surface 

Source
pub fn with_surface<A: ResourceApp, S: 'static, T>(
    harness: &mut FrameHarness,
    visit: impl FnOnce(&mut S) -> T,
) -> Option<T>
Expand description

Run visit on the custom surface of type S that A’s view hosts in harness (what ViewCx::surface mounted), then the frames that follow; None when the view hosts no such surface at its root. For a test that drives a component mounted another way than HeadlessApp (two windows over one record).