Skip to main content

open_with

Function open_with 

Source
pub fn open_with(
    state: &AppState,
    prep: Prep,
    proceed: Box<dyn FnOnce(How) + Send + 'static>,
    record: impl FnOnce(),
) -> Opened
Expand description

open, running record (the choice the closure acts on) before the window can end: with the window already open it runs under the ledger lock, so the window cannot end between the two, and for a new window it runs before the window’s task starts. The closure therefore always finds record’s write already made, never one that outlives it.