pub async fn recover_state_with_backoff<F, T>(
operation: F,
max_attempts: u32,
operation_name: &str,
) -> Result<T, CommonError>Expand description
Attempt state recovery with exponential backoff.
§Arguments
operation- The operation to retrymax_attempts- Maximum number of retry attemptsoperation_name- Name of the operation for logging
§Type Parameters
F- The operation function typeT- The return type of the operation
§Returns
Result containing the operation result or CommonError
§Behavior
- Retries operation up to max_attempts times
- Uses exponential backoff (doubles delay after each failure)
- Starts with 100ms delay
- Logs each attempt and failure