Skip to main content

with_retry

Function with_retry 

Source
pub async fn with_retry<T, F, Fut>(
    retry_config: &RetryConfig,
    build_request: F,
) -> Result<(T, HeaderMap)>
where T: DeserializeOwned, F: FnMut() -> Fut, Fut: Future<Output = Result<RequestBuilder>>,
Expand description

Helper to execute a request-building closure with retry logic.

The closure should build and return a fresh RequestBuilder for each attempt.