Function spawn_with_result

Source
pub fn spawn_with_result<R, F>(payload: &Payload<Result<R, Error>>, task: F)
where R: Clone + Send + 'static, F: Future<Output = Result<R>> + Send + 'static,
Expand description

Spawn an async task that will result in egui redraw upon its completion. Upon the task completion, the supplied Payload will be populated with the task result.