run

Function run 

pub fn run<T>(
    id: Id,
    f: impl FnOnce(&dyn Window) -> T + Send + 'static,
) -> Task<T>
where T: Send + 'static,
Expand description

Runs the given callback with a reference to the Window with the given Id.

Note that if the window closes before this call is processed the callback will not be run.