pub struct ErrorRecoveryManager { /* private fields */ }
Expand description
Simplified error recovery manager
Implementations§
Source§impl ErrorRecoveryManager
impl ErrorRecoveryManager
Sourcepub fn with_config(config: RecoveryConfig) -> Self
pub fn with_config(config: RecoveryConfig) -> Self
Create a new error recovery manager with custom configuration
Sourcepub fn attempt_recovery<T, F>(
&mut self,
operation: F,
context: &str,
) -> RecoveryResult<T>
pub fn attempt_recovery<T, F>( &mut self, operation: F, context: &str, ) -> RecoveryResult<T>
Attempt to recover from a binary export error
Sourcepub fn check_index_corruption<P: AsRef<Path>>(
&mut self,
binary_path: P,
) -> Result<bool, BinaryExportError>
pub fn check_index_corruption<P: AsRef<Path>>( &mut self, binary_path: P, ) -> Result<bool, BinaryExportError>
Detect and handle index corruption
Sourcepub fn rebuild_index<P: AsRef<Path>>(
&mut self,
binary_path: P,
) -> Result<BinaryIndex, BinaryExportError>
pub fn rebuild_index<P: AsRef<Path>>( &mut self, binary_path: P, ) -> Result<BinaryIndex, BinaryExportError>
Attempt to rebuild a corrupted index
Sourcepub fn get_error_stats(&self) -> &ErrorStatistics
pub fn get_error_stats(&self) -> &ErrorStatistics
Get error statistics
Sourcepub fn get_error_stats_mut(&mut self) -> &mut ErrorStatistics
pub fn get_error_stats_mut(&mut self) -> &mut ErrorStatistics
Get mutable error statistics (for internal use)
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset error statistics
Sourcepub fn generate_error_report(&self) -> ErrorReport
pub fn generate_error_report(&self) -> ErrorReport
Generate error report
Sourcepub fn update_config(&mut self, config: RecoveryConfig)
pub fn update_config(&mut self, config: RecoveryConfig)
Update recovery configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorRecoveryManager
impl RefUnwindSafe for ErrorRecoveryManager
impl Send for ErrorRecoveryManager
impl Sync for ErrorRecoveryManager
impl Unpin for ErrorRecoveryManager
impl UnwindSafe for ErrorRecoveryManager
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 more