pub struct ParseResultWithIssues<T> {
pub result: ParseResult<T>,
pub issues: Vec<ParseIssue>,
}Expand description
Parse result with accumulated issues for partial recovery
Allows parsing to continue even when encountering recoverable errors, collecting issues for later review while still producing a usable result. Essential for editor integration and robust script processing.
Fields§
§result: ParseResult<T>The parsed result (if successful)
issues: Vec<ParseIssue>Accumulated parse issues from warnings to recoverable errors
Implementations§
Source§impl<T> ParseResultWithIssues<T>
impl<T> ParseResultWithIssues<T>
Sourcepub const fn err(error: ParseError) -> Self
pub const fn err(error: ParseError) -> Self
Sourcepub const fn with_issues(
result: ParseResult<T>,
issues: Vec<ParseIssue>,
) -> Self
pub const fn with_issues( result: ParseResult<T>, issues: Vec<ParseIssue>, ) -> Self
Sourcepub fn add_issue(self, issue: ParseIssue) -> Self
pub fn add_issue(self, issue: ParseIssue) -> Self
Sourcepub fn critical_issues(&self) -> Vec<&ParseIssue>
pub fn critical_issues(&self) -> Vec<&ParseIssue>
Get only critical issues from the collection
Critical issues indicate serious problems that will likely affect rendering or script functionality.
§Returns
Vector of references to critical issues only
Sourcepub fn has_blocking_issues(&self) -> bool
pub fn has_blocking_issues(&self) -> bool
Check if result has any blocking issues
Blocking issues are those that should prevent further processing or indicate fundamental problems with the script.
§Returns
True if any issue is marked as blocking
Sourcepub fn count_by_severity(&self, severity: IssueSeverity) -> usize
pub fn count_by_severity(&self, severity: IssueSeverity) -> usize
Trait Implementations§
Source§impl<T: Clone> Clone for ParseResultWithIssues<T>
impl<T: Clone> Clone for ParseResultWithIssues<T>
Source§fn clone(&self) -> ParseResultWithIssues<T>
fn clone(&self) -> ParseResultWithIssues<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Debug> Debug for ParseResultWithIssues<T>
impl<T: Debug> Debug for ParseResultWithIssues<T>
Source§impl<T> From<Result<T, ParseError>> for ParseResultWithIssues<T>
impl<T> From<Result<T, ParseError>> for ParseResultWithIssues<T>
Source§fn from(result: ParseResult<T>) -> Self
fn from(result: ParseResult<T>) -> Self
Convert a simple ParseResult into a ParseResultWithIssues
Creates a result with no accumulated issues.