Skip to main content

with_reference_policy

Function with_reference_policy 

Source
pub async fn with_reference_policy<F: Future>(
    policy: Arc<ReferencePolicy>,
    fut: F,
) -> F::Output
Expand description

Run fut with policy as the reference policy every Client without its own (ClientBuilder::reference_policy) checks its requests and redirect hops against. A host scopes the policy that admitted a config over that config’s run; a task spawned from fut must be wrapped again (current_reference_policy).