pub fn with_current<F, R>(f: F) -> R
    where
        F: FnOnce(&System) -> R,
    {
        CURRENT.with(|cell| match *cell.borrow() {
            Some(ref sys) => f(sys),
            None => panic!("System is not running"),
        })
    }
/// Execute function with system reference.
Execute function with system reference.
Execute function with system reference .
pub fn with_current<F, R>(f: F) -> R
    where
        F: FnOnce(&System) -> R,
    {
        CURRENT.with(|cell| match *cell.borrow() {
            Some(ref sys) => f(sys),
            None => panic!("System is not running"),
        })
    }
pub fn with_current < F , R > ( f : F ) -> R where F : FnOnce ( & System ) -> R , { CURRENT . with ( | cell | match * cell . borrow ( ) { Some ( ref sys ) => f ( sys ) , None => panic ! ( " " ) , } ) }
Execute function with system reference.
Execute function with system reference .
f
F