Skip to main content

scope

Function scope 

Source
pub fn scope<'env, F, T>(f: F) -> impl Future<Output = T>
where F: for<'scope> AsyncFnOnce(&'scope Scope<'scope, 'env>) -> T,
Expand description

Create a structured-concurrency scope in which tasks may be spawned that borrow from the enclosing stack frame.

This is the async analogue of std::thread::scope.