pub struct ErrorDiagnosticsManager { /* private fields */ }Expand description
Error diagnostics manager
Implementations§
Source§impl ErrorDiagnosticsManager
impl ErrorDiagnosticsManager
Sourcepub fn new(config: DiagnosticsConfig) -> Self
pub fn new(config: DiagnosticsConfig) -> Self
Create a new error diagnostics manager
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a new manager with default configuration
Sourcepub fn record_error(&mut self, error: JitError) -> DiagnosticError
pub fn record_error(&mut self, error: JitError) -> DiagnosticError
Record an error with diagnostics
Sourcepub fn push_context(&mut self, context: DiagnosticContext)
pub fn push_context(&mut self, context: DiagnosticContext)
Push diagnostic context
Sourcepub fn pop_context(&mut self) -> Option<DiagnosticContext>
pub fn pop_context(&mut self) -> Option<DiagnosticContext>
Pop diagnostic context
Sourcepub fn get_error_history(&self) -> &[DiagnosticError]
pub fn get_error_history(&self) -> &[DiagnosticError]
Get error history
Sourcepub fn get_stats(&self) -> &DiagnosticsStats
pub fn get_stats(&self) -> &DiagnosticsStats
Get statistics
Sourcepub fn format_error(
&self,
error: &DiagnosticError,
format_config: &FormatterConfig,
) -> String
pub fn format_error( &self, error: &DiagnosticError, format_config: &FormatterConfig, ) -> String
Format error for display
Sourcepub fn get_similar_errors(
&self,
error: &DiagnosticError,
) -> Vec<&DiagnosticError>
pub fn get_similar_errors( &self, error: &DiagnosticError, ) -> Vec<&DiagnosticError>
Get similar errors from history
Sourcepub fn export_diagnostics(&self, output_path: &str) -> JitResult<()>
pub fn export_diagnostics(&self, output_path: &str) -> JitResult<()>
Export diagnostics data
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorDiagnosticsManager
impl RefUnwindSafe for ErrorDiagnosticsManager
impl Send for ErrorDiagnosticsManager
impl Sync for ErrorDiagnosticsManager
impl Unpin for ErrorDiagnosticsManager
impl UnsafeUnpin for ErrorDiagnosticsManager
impl UnwindSafe for ErrorDiagnosticsManager
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> 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