Function with_retry

Source
pub async fn with_retry<F, Fut, T, E>(
    config: RetryConfig,
    operation: F,
) -> Result<T>
where F: Fn() -> Fut, Fut: Future<Output = Result<T, E>>, E: Into<SerperError>,
Expand description

Executes a function with retry logic

§Arguments

  • config - Retry configuration
  • operation - Async function to retry

§Returns

Result containing the operation result or final error