pub struct ErrorRecoverySystem { /* private fields */ }Expand description
Comprehensive error recovery system
Implementations§
Source§impl ErrorRecoverySystem
impl ErrorRecoverySystem
Sourcepub fn new(config: ErrorRecoveryConfig) -> Self
pub fn new(config: ErrorRecoveryConfig) -> Self
Create a new error recovery system
Sourcepub async fn handle_error(
&mut self,
error: ErrorEvent,
) -> Result<RecoveryResult>
pub async fn handle_error( &mut self, error: ErrorEvent, ) -> Result<RecoveryResult>
Handle an error event and attempt recovery
Sourcepub fn record_error(&mut self, error: ErrorEvent)
pub fn record_error(&mut self, error: ErrorEvent)
Record an error event
Sourcepub async fn attempt_recovery(
&mut self,
error: &ErrorEvent,
) -> Result<RecoveryResult>
pub async fn attempt_recovery( &mut self, error: &ErrorEvent, ) -> Result<RecoveryResult>
Attempt recovery using appropriate strategies
Sourcepub async fn execute_recovery_strategy(
&self,
strategy: &RecoveryStrategy,
error: &ErrorEvent,
) -> Result<RecoveryResult>
pub async fn execute_recovery_strategy( &self, strategy: &RecoveryStrategy, error: &ErrorEvent, ) -> Result<RecoveryResult>
Execute a specific recovery strategy
Sourcepub fn get_recovery_strategies(
&self,
error_type: &ErrorType,
) -> Vec<RecoveryStrategy>
pub fn get_recovery_strategies( &self, error_type: &ErrorType, ) -> Vec<RecoveryStrategy>
Get recovery strategies for an error type
Sourcepub async fn check_system_health(&mut self) -> HealthStatus
pub async fn check_system_health(&mut self) -> HealthStatus
Check system health
Sourcepub fn enable_safe_mode(&mut self)
pub fn enable_safe_mode(&mut self)
Enable safe mode
Sourcepub fn disable_safe_mode(&mut self)
pub fn disable_safe_mode(&mut self)
Disable safe mode
Sourcepub fn get_error_statistics(&self) -> ErrorStatistics
pub fn get_error_statistics(&self) -> ErrorStatistics
Get error statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorRecoverySystem
impl RefUnwindSafe for ErrorRecoverySystem
impl Send for ErrorRecoverySystem
impl Sync for ErrorRecoverySystem
impl Unpin for ErrorRecoverySystem
impl UnsafeUnpin for ErrorRecoverySystem
impl UnwindSafe for ErrorRecoverySystem
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.