pub struct CheckpointError {
pub kind: CheckpointErrorKind,
pub message: String,
pub source: Option<String>,
pub context: ErrorContext,
pub recovery: RecoverySuggestion,
pub timestamp: SystemTime,
}Expand description
Enhanced checkpoint error with detailed diagnostic information
Fields§
§kind: CheckpointErrorKindError kind for categorization
message: StringHuman-readable error message
source: Option<String>Source error if applicable
context: ErrorContextError context and diagnostics
recovery: RecoverySuggestionRecovery suggestions
timestamp: SystemTimeError timestamp
Implementations§
Source§impl CheckpointError
impl CheckpointError
Sourcepub fn new(kind: CheckpointErrorKind, message: impl Into<String>) -> Self
pub fn new(kind: CheckpointErrorKind, message: impl Into<String>) -> Self
Create a new checkpoint error
Sourcepub fn with_context(self, context: ErrorContext) -> Self
pub fn with_context(self, context: ErrorContext) -> Self
Add context information to the error
Sourcepub fn with_recovery(self, recovery: RecoverySuggestion) -> Self
pub fn with_recovery(self, recovery: RecoverySuggestion) -> Self
Add recovery suggestion to the error
Sourcepub fn with_source(self, source: impl Into<String>) -> Self
pub fn with_source(self, source: impl Into<String>) -> Self
Add source error information
Sourcepub fn configuration(message: impl Into<String>) -> Self
pub fn configuration(message: impl Into<String>) -> Self
Create configuration error
Sourcepub fn v2_integration(message: impl Into<String>) -> Self
pub fn v2_integration(message: impl Into<String>) -> Self
Create V2 integration error
Sourcepub fn validation(message: impl Into<String>) -> Self
pub fn validation(message: impl Into<String>) -> Self
Create validation error
Sourcepub fn corruption(message: impl Into<String>) -> Self
pub fn corruption(message: impl Into<String>) -> Self
Create corruption error
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Get error severity level
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if error is recoverable
Sourcepub fn retry_delay_ms(&self) -> Option<u64>
pub fn retry_delay_ms(&self) -> Option<u64>
Get suggested retry delay in milliseconds
Sourcepub fn diagnostic_report(&self) -> String
pub fn diagnostic_report(&self) -> String
Generate diagnostic report
Trait Implementations§
Source§impl Clone for CheckpointError
impl Clone for CheckpointError
Source§fn clone(&self) -> CheckpointError
fn clone(&self) -> CheckpointError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CheckpointError
impl Debug for CheckpointError
Source§impl Display for CheckpointError
impl Display for CheckpointError
Source§impl Error for CheckpointError
impl Error for CheckpointError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Box<dyn Error + Sync + Send>> for CheckpointError
Create unknown error from any error type
impl From<Box<dyn Error + Sync + Send>> for CheckpointError
Create unknown error from any error type
Source§impl From<CheckpointError> for NativeBackendError
impl From<CheckpointError> for NativeBackendError
Source§fn from(error: CheckpointError) -> Self
fn from(error: CheckpointError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for CheckpointError
Convert from std::io::Error
impl From<Error> for CheckpointError
Convert from std::io::Error
Source§impl From<NativeBackendError> for CheckpointError
Convert from NativeBackendError
impl From<NativeBackendError> for CheckpointError
Convert from NativeBackendError
Source§fn from(error: NativeBackendError) -> Self
fn from(error: NativeBackendError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CheckpointError
impl RefUnwindSafe for CheckpointError
impl Send for CheckpointError
impl Sync for CheckpointError
impl Unpin for CheckpointError
impl UnwindSafe for CheckpointError
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