pub struct ErrorHandler { /* private fields */ }Expand description
Error Handler
Maps error types to recovery actions.
Implementations§
Source§impl ErrorHandler
impl ErrorHandler
Sourcepub fn with_default_action(action: RecoveryAction) -> Self
pub fn with_default_action(action: RecoveryAction) -> Self
Create error handler with custom default action
Sourcepub fn handle_error(&self, error: &Error) -> RecoveryAction
pub fn handle_error(&self, error: &Error) -> RecoveryAction
Sourcepub fn default_retry_policy(&self) -> &RetryPolicy
pub fn default_retry_policy(&self) -> &RetryPolicy
Get default retry policy
Sourcepub fn set_default_retry_policy(&mut self, policy: RetryPolicy)
pub fn set_default_retry_policy(&mut self, policy: RetryPolicy)
Set default retry policy
Trait Implementations§
Source§impl Clone for ErrorHandler
impl Clone for ErrorHandler
Source§impl Debug for ErrorHandler
impl Debug for ErrorHandler
Auto Trait Implementations§
impl Freeze for ErrorHandler
impl RefUnwindSafe for ErrorHandler
impl Send for ErrorHandler
impl Sync for ErrorHandler
impl Unpin for ErrorHandler
impl UnsafeUnpin 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