pub struct ErrorHandler { /* private fields */ }Expand description
Error handler for retrying operations
Implementations§
Source§impl ErrorHandler
impl ErrorHandler
Sourcepub fn new(strategy: RetryStrategy) -> Self
pub fn new(strategy: RetryStrategy) -> Self
Create a new error handler with the given retry strategy
Sourcepub async fn retry<F, T>(&self, operation: F) -> StreamResult<T>where
F: FnMut() -> StreamResult<T>,
pub async fn retry<F, T>(&self, operation: F) -> StreamResult<T>where
F: FnMut() -> StreamResult<T>,
Retry an operation with the configured strategy
Auto Trait Implementations§
impl Freeze for ErrorHandler
impl RefUnwindSafe for ErrorHandler
impl Send for ErrorHandler
impl Sync for ErrorHandler
impl Unpin for ErrorHandler
impl UnwindSafe for ErrorHandler
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