pub struct ErrorHandler { /* private fields */ }Expand description
Central error handling and reporting system
Implementations§
Source§impl ErrorHandler
impl ErrorHandler
Sourcepub fn with_config(max_recent_errors: usize, reporter: ErrorReporter) -> Self
pub fn with_config(max_recent_errors: usize, reporter: ErrorReporter) -> Self
Create error handler with custom configuration
Sourcepub fn handle_error(&mut self, error: MemScopeError) -> ErrorResponse
pub fn handle_error(&mut self, error: MemScopeError) -> ErrorResponse
Handle an error with appropriate response
Sourcepub fn get_error_counts(&self) -> HashMap<ErrorKind, usize>
pub fn get_error_counts(&self) -> HashMap<ErrorKind, usize>
Get error statistics by kind
Sourcepub fn get_recent_errors(&self) -> Vec<MemScopeError>
pub fn get_recent_errors(&self) -> Vec<MemScopeError>
Get recent errors for analysis
Sourcepub fn clear_statistics(&mut self)
pub fn clear_statistics(&mut self)
Clear error statistics and history
Sourcepub fn get_error_frequency(&self) -> ErrorFrequencyAnalysis
pub fn get_error_frequency(&self) -> ErrorFrequencyAnalysis
Get error frequency analysis
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorHandler
impl !RefUnwindSafe for ErrorHandler
impl Send for ErrorHandler
impl Sync for ErrorHandler
impl Unpin for ErrorHandler
impl !UnwindSafe for ErrorHandler
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