enter

Function enter 

Source
pub fn enter<R>(f: impl FnOnce() -> R) -> R
Expand description

Creates new session globals on the current thread if they doesn’t exist already and then executes the given closure.

Prefer Session::enter to this function if possible to also set the source map and thread pool.

Using this instead of Session::enter may cause unexpected panics.

See Session::enter for more details.