pub fn call<O>(f: impl FnMut() -> O) -> OExpand description
Call a given function with hot-reloading enabled. If the function’s code changes, call will use
the new version of the function. If code above the function changes, this will emit a panic
that forces an unwind to the next call instance.
WASM/rust does not support unwinding, so call will not track dependency graph changes.
If you are building a framework for use on WASM, you will need to use Subsecond::HotFn directly.
However, if you wrap your calling code in a future, you can simply drop the future which will
cause drop to execute and get something similar to unwinding. Not great if refcells are open.