Function run_convert

Source
async fn run_convert<T: 'static, Func, Fut, Ret>(
    runner: &ThreadBoundRunner<T>,
    f: Func,
) -> Result<Ret, RepositoryError>
where Func: FnOnce(Rc<T>) -> Fut + Send + 'static, Fut: Future<Output = Result<JsValue, JsValue>>, Ret: DeserializeOwned + Send + Sync + 'static,
Expand description

Utility function that runs a closure in a thread-bound manner, and converts the Result from Result<JsValue, JsValue> to a typed Result<T, RepositoryError>.