pub fn with_global_mut<F, R, G>(
	global: &'static std::thread::LocalKey<std::cell::RefCell<G>>,
	func: F,
) -> R
where
	F: FnOnce(&mut G) -> R,
{
	global.with(|r| func(r.borrow_mut().borrow_mut()))
}
// Run function with global variable mutable access
Run function with global variable mutable access
Run function with global variable mutable access
pub fn with_global_mut<F, R, G>(
	global: &'static std::thread::LocalKey<std::cell::RefCell<G>>,
	func: F,
) -> R
where
	F: FnOnce(&mut G) -> R,
{
	global.with(|r| func(r.borrow_mut().borrow_mut()))
}
pub fn with_global_mut < F , R , G > ( global : & ' static std :: thread :: LocalKey < std :: cell :: RefCell < G > > , func : F , ) -> R where F : FnOnce ( & mut G ) -> R , { global . with ( | r | func ( r . borrow_mut ( ) . borrow_mut ( ) ) ) }
Run function with global variable mutable access
Run function with global variable mutable access
global
&'static std::thread::LocalKey<std::cell::RefCell<G>>
func
F