pub fn with_context<T, F>(&self, f: F) -> T
    where
        F: FnOnce(&mut UserContext) -> T,
    {
        let mut inner = self.inner.lock();
        let mut cx = inner.context.as_mut().unwrap();
        f(&mut cx)
    }
/// Access saved context of current thread.
///
/// Will panic if the context is not availiable.
Access saved context of current thread.
Will panic if the context is not availiable.
Access saved context of current thread . Will panic if the context is not availiable .
pub fn with_context<T, F>(&self, f: F) -> T
    where
        F: FnOnce(&mut UserContext) -> T,
    {
        let mut inner = self.inner.lock();
        let mut cx = inner.context.as_mut().unwrap();
        f(&mut cx)
    }
pub fn with_context < T , F > ( & self , f : F ) -> T where F : FnOnce ( & mut UserContext ) -> T , { let mut inner = self . inner . lock ( ) ; let mut cx = inner . context . as_mut ( ) . unwrap ( ) ; f ( & mut cx ) }
Access saved context of current thread.
Access saved context of current thread .
&self
f
F
&self
f
F