Skip to main content

run

Function run 

Source
pub fn run<R>(
    inside: &AtomicBool,
    f: impl FnOnce() -> R,
    switch: impl FnOnce(&mut dyn FnMut()),
) -> R
Expand description

Runs f through switch, which moves to the stack, makes the call it is handed and comes back. A call made while inside says the game is on the stack already is a plain one, so it doesn’t start again from the top.