fn safe_call<F>(shell: Arc<UiMutex<State>>, cb: F)where F: FnOnce(&Arc<UiMutex<State>>) -> Result<(), String> + 'static + Send,