Skip to main content

TestAppContextExt

Trait TestAppContextExt 

Source
pub trait TestAppContextExt {
    // Required method
    fn wait_for(
        &mut self,
        window: AnyWindowHandle,
        timeout: Duration,
        predicate: impl FnMut(&mut Window, &mut App) -> bool,
    ) -> impl Future<Output = ()>;
}
Expand description

Executor-aware asynchronous helpers on TestAppContext that run outside a borrowed window update.

Required Methods§

Source

fn wait_for( &mut self, window: AnyWindowHandle, timeout: Duration, predicate: impl FnMut(&mut Window, &mut App) -> bool, ) -> impl Future<Output = ()>

Repeatedly refreshes frames on the GPUI test clock (every 10 ms) until predicate returns true, or panics with all registered element paths once timeout elapses.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl TestAppContextExt for TestAppContext

Source§

async fn wait_for( &mut self, handle: AnyWindowHandle, timeout: Duration, predicate: impl FnMut(&mut Window, &mut App) -> bool, )

Implementors§