run_with_cancellable

Function run_with_cancellable 

Source
pub async fn run_with_cancellable<F, R>(
    f: F,
    cancellable: &Cancellable,
) -> Result<R>
where F: Future<Output = Result<R>>,
Expand description

Call a faillible future, while monitoring cancellable and return an error if cancelled.