pub struct ErrorDetail {
pub name: String,
pub retry: Retry,
pub result_code: i32,
pub should_stop: bool,
}Expand description
The error detail passed through and transformed by the handler chain.
Immutable — handlers produce new instances via with_* methods.
Fields§
§name: StringClassification name (typically the error type name).
retry: RetryWhether the operation should be retried.
result_code: i32Result code for the operation (0 = OK, nonzero = error).
should_stop: boolWhether execution should stop after this error.
Implementations§
Source§impl ErrorDetail
impl ErrorDetail
pub fn ok() -> Self
pub fn non_retryable(name: impl Into<String>) -> Self
pub fn retryable(name: impl Into<String>) -> Self
pub fn unknown(name: impl Into<String>) -> Self
pub fn is_retryable(&self) -> bool
pub fn with_retryable(self) -> Self
pub fn with_not_retryable(self) -> Self
pub fn with_result_code(self, code: i32) -> Self
pub fn with_stop(self) -> Self
Trait Implementations§
Source§impl Clone for ErrorDetail
impl Clone for ErrorDetail
Auto Trait Implementations§
impl Freeze for ErrorDetail
impl RefUnwindSafe for ErrorDetail
impl Send for ErrorDetail
impl Sync for ErrorDetail
impl Unpin for ErrorDetail
impl UnsafeUnpin for ErrorDetail
impl UnwindSafe for ErrorDetail
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