Function ptproxy::utils::cancellable
source · pub async fn cancellable<F: Future>(
a: F,
token: &CancellationToken
) -> Option<F::Output>
Expand description
a future that resolves with Some(_) if ‘a’ resolves, and resolves with None if the CancellationToken is cancelled first.