pub struct ErrorAggregator { /* private fields */ }Expand description
Error aggregator for collecting and reporting multiple errors
Implementations§
Source§impl ErrorAggregator
impl ErrorAggregator
Sourcepub fn with_max_errors(self, max: usize) -> Self
pub fn with_max_errors(self, max: usize) -> Self
Set maximum number of errors to collect
Sourcepub fn with_max_warnings(self, max: usize) -> Self
pub fn with_max_warnings(self, max: usize) -> Self
Set maximum number of warnings to collect
Sourcepub fn add_error(&mut self, error: EnhancedError)
pub fn add_error(&mut self, error: EnhancedError)
Add an enhanced error
Sourcepub fn add_star_error(
&mut self,
error: StarError,
context: Option<ErrorContext>,
)
pub fn add_star_error( &mut self, error: StarError, context: Option<ErrorContext>, )
Add a StarError with automatic enhancement
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Check if there are any errors
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Check if there are any warnings
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Get error count
Sourcepub fn warning_count(&self) -> usize
pub fn warning_count(&self) -> usize
Get warning count
Sourcepub fn errors(&self) -> &[EnhancedError]
pub fn errors(&self) -> &[EnhancedError]
Get all errors
Sourcepub fn warnings(&self) -> &[EnhancedError]
pub fn warnings(&self) -> &[EnhancedError]
Get all warnings
Sourcepub fn generate_report(&self) -> String
pub fn generate_report(&self) -> String
Generate a comprehensive error report
Sourcepub fn generate_json_report(&self) -> Value
pub fn generate_json_report(&self) -> Value
Generate structured JSON report
Trait Implementations§
Source§impl Debug for ErrorAggregator
impl Debug for ErrorAggregator
Source§impl Default for ErrorAggregator
impl Default for ErrorAggregator
Source§fn default() -> ErrorAggregator
fn default() -> ErrorAggregator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ErrorAggregator
impl RefUnwindSafe for ErrorAggregator
impl Send for ErrorAggregator
impl Sync for ErrorAggregator
impl Unpin for ErrorAggregator
impl UnsafeUnpin for ErrorAggregator
impl UnwindSafe for ErrorAggregator
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