pub struct RetryExecutor { /* private fields */ }
Expand description
Retry executor that applies policies
Implementations§
Source§impl RetryExecutor
impl RetryExecutor
Sourcepub fn new(policy: RetryPolicy) -> Self
pub fn new(policy: RetryPolicy) -> Self
Create a new retry executor
Sourcepub async fn execute<T, F, Fut>(&self, operation: F) -> RetryResult<T>
pub async fn execute<T, F, Fut>(&self, operation: F) -> RetryResult<T>
Execute an operation with retry logic
Sourcepub fn get_policy(&self) -> &RetryPolicy
pub fn get_policy(&self) -> &RetryPolicy
Get retry policy
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RetryExecutor
impl RefUnwindSafe for RetryExecutor
impl Send for RetryExecutor
impl Sync for RetryExecutor
impl Unpin for RetryExecutor
impl UnwindSafe for RetryExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more