Skip to main content

with_runtime

Function with_runtime 

Source
pub fn with_runtime<R>(f: impl FnOnce(&mut Runtime<'_>) -> R) -> R
Expand description

Run f with the active runtime.

Panics if no runtime is installed, or if one is already borrowed (e.g. a re-entrant call from inside another with_runtime).