pub struct ErrorUtils;Expand description
Error handling utilities
Implementations§
Source§impl ErrorUtils
impl ErrorUtils
Sourcepub fn generic_error(message: &str) -> Error
pub fn generic_error(message: &str) -> Error
Create a generic error
Sourcepub fn context_error(message: &str, context: &str) -> Error
pub fn context_error(message: &str, context: &str) -> Error
Create an error with context
Sourcepub fn wrap_error<E: Display>(error: E, context: &str) -> Error
pub fn wrap_error<E: Display>(error: E, context: &str) -> Error
Wrap an error with additional context
Sourcepub fn is_retryable_error(error: &Error) -> bool
pub fn is_retryable_error(error: &Error) -> bool
Check if error is retryable
Auto Trait Implementations§
impl Freeze for ErrorUtils
impl RefUnwindSafe for ErrorUtils
impl Send for ErrorUtils
impl Sync for ErrorUtils
impl Unpin for ErrorUtils
impl UnwindSafe for ErrorUtils
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