Skip to main content

drive_live_window_writing_after

Function drive_live_window_writing_after 

Source
pub fn drive_live_window_writing_after<A: ResourceApp, T>(
    debounce: Duration,
    drive: impl FnOnce(&mut App) -> T,
) -> Result<T, LaunchError>
Expand description

drive_live_window, with the window’s record written debounce after the last edit instead of the window’s own [app_state::DEFAULT_DEBOUNCE]. The store writes on a thread of its own and wakes the window when the write lands, so whether a frame observed while typing takes that wake depends on how long the frames before it took. A debounce longer than the test holds every write past what it observes.