pub fn with_local_recorder<T>( recorder: &dyn Recorder, f: impl FnOnce() -> T, ) -> T
Runs the closure with the given recorder set as the global recorder for the duration.