pub struct ContextualCacheError {
pub error: CacheError,
pub context: ErrorContext,
}Expand description
Enhanced cache error with context
Fields§
§error: CacheErrorThe underlying cache error
context: ErrorContextError context
Implementations§
Source§impl ContextualCacheError
impl ContextualCacheError
Sourcepub fn new(error: CacheError, context: ErrorContext) -> Self
pub fn new(error: CacheError, context: ErrorContext) -> Self
Create a new contextual error
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Get the error severity
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if the error is recoverable
Trait Implementations§
Source§impl Debug for ContextualCacheError
impl Debug for ContextualCacheError
Source§impl Display for ContextualCacheError
impl Display for ContextualCacheError
Source§impl Error for ContextualCacheError
impl Error for ContextualCacheError
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()
Auto Trait Implementations§
impl Freeze for ContextualCacheError
impl !RefUnwindSafe for ContextualCacheError
impl Send for ContextualCacheError
impl Sync for ContextualCacheError
impl Unpin for ContextualCacheError
impl UnsafeUnpin for ContextualCacheError
impl !UnwindSafe for ContextualCacheError
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