Skip to main content

with_interpreter_state

Function with_interpreter_state 

Source
pub fn with_interpreter_state<F, R>(state: &mut Interpreter, f: F) -> R
where F: FnOnce(&Interpreter) -> R,
Expand description

Temporarily install an explicit interpreter instance into thread-local state while executing f. This keeps legacy builtin TLS access working, but lets higher-level code own interpreter instances directly.