Retryable

Trait Retryable 

Source
pub trait Retryable {
    // Provided method
    fn execute_with_retry<F, T, E>(
        &self,
        operation: F,
        max_retries: u32,
        delay_ms: u64,
    ) -> Result<T>
       where F: FnMut() -> Result<T, E> + Send,
             E: Display + Send + 'static,
             T: Send { ... }
}
Expand description

Retryable trait for operations that can be retried

Provided Methods§

Source

fn execute_with_retry<F, T, E>( &self, operation: F, max_retries: u32, delay_ms: u64, ) -> Result<T>
where F: FnMut() -> Result<T, E> + Send, E: Display + Send + 'static, T: Send,

Execute with retry

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§