pub struct ErrorManager { /* private fields */ }Expand description
Central error manager for the entire MemScope system
Implementations§
Source§impl ErrorManager
impl ErrorManager
pub fn new() -> Self
pub fn with_config(max_recent_errors: usize) -> Self
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if error tracking is enabled
Sourcepub fn record_error(
&self,
module: &str,
error_type: &str,
error: &MemScopeError,
)
pub fn record_error( &self, module: &str, error_type: &str, error: &MemScopeError, )
Record an error with full context
Sourcepub fn get_stats(&self) -> ErrorStats
pub fn get_stats(&self) -> ErrorStats
Get current error statistics
Sourcepub fn clear_stats(&self)
pub fn clear_stats(&self)
Clear error statistics (for testing)
Sourcepub fn generate_report(&self) -> ErrorReport
pub fn generate_report(&self) -> ErrorReport
Get error report
Sourcepub fn convert_to_memscope<T: IntoMemScopeError>(
error: T,
module: &str,
) -> MemScopeError
pub fn convert_to_memscope<T: IntoMemScopeError>( error: T, module: &str, ) -> MemScopeError
Convert various error types to MemScopeError
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorManager
impl RefUnwindSafe for ErrorManager
impl Send for ErrorManager
impl Sync for ErrorManager
impl Unpin for ErrorManager
impl UnsafeUnpin for ErrorManager
impl UnwindSafe for ErrorManager
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