[][src]Function yaar_reactor::with_reactor_as

pub fn with_reactor_as<R: Reactor, T>(
    reactor: &R,
    scoped: impl FnOnce(&R) -> T
) -> T

Set the global reactor instance for a given function scope. The global reactor supports being modified recursively as it is restored via stack but should not be called in parellel.