Skip to main content

within

Function within 

Source
pub async fn within<F: Future>(fut: F) -> F::Output
Expand description

Run fut with a private copy of the current options, so that changes made inside (via configure or cd) do not leak out.

The scope is task-local: it follows .await points but is not inherited by tokio::spawned tasks.