pub struct ErrorClassifier;Expand description
Classify an anyhow error and determine appropriate handling
Implementations§
Source§impl ErrorClassifier
impl ErrorClassifier
Sourcepub fn is_client_disconnect(error: &Error) -> bool
pub fn is_client_disconnect(error: &Error) -> bool
Check if error is a client disconnect (broken pipe)
Sourcepub fn is_authentication_error(error: &Error) -> bool
pub fn is_authentication_error(error: &Error) -> bool
Check if error is an authentication failure
Sourcepub fn is_network_error(error: &Error) -> bool
pub fn is_network_error(error: &Error) -> bool
Check if error is a network/connectivity issue
Sourcepub fn should_skip_client_error_response(error: &Error) -> bool
pub fn should_skip_client_error_response(error: &Error) -> bool
Check if we should skip sending error response to client
Auto Trait Implementations§
impl Freeze for ErrorClassifier
impl RefUnwindSafe for ErrorClassifier
impl Send for ErrorClassifier
impl Sync for ErrorClassifier
impl Unpin for ErrorClassifier
impl UnwindSafe for ErrorClassifier
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