pub type ExitFn = Box<dyn FnMut(&AppHandle)>;
Runs when the application closes (AppBuilder::on_exit), before the app.exit step.
AppBuilder::on_exit
app.exit
pub struct ExitFn(/* private fields */);