pub struct ParseResultWithWarnings<T> {
pub result: T,
pub warnings: Vec<ParseWarning>,
}Expand description
Result of parsing with warnings collected.
Fields§
§result: TThe parsed result.
warnings: Vec<ParseWarning>Warnings encountered during parsing.
Implementations§
Source§impl<T> ParseResultWithWarnings<T>
impl<T> ParseResultWithWarnings<T>
Sourcepub fn new(result: T, warnings: Vec<ParseWarning>) -> Self
pub fn new(result: T, warnings: Vec<ParseWarning>) -> Self
Creates a new result with warnings.
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Returns true if there are any warnings.
Sourcepub fn warnings_at_least(
&self,
min_severity: WarningSeverity,
) -> Vec<&ParseWarning>
pub fn warnings_at_least( &self, min_severity: WarningSeverity, ) -> Vec<&ParseWarning>
Returns warnings filtered by minimum severity.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ParseResultWithWarnings<T>where
T: Freeze,
impl<T> RefUnwindSafe for ParseResultWithWarnings<T>where
T: RefUnwindSafe,
impl<T> Send for ParseResultWithWarnings<T>where
T: Send,
impl<T> Sync for ParseResultWithWarnings<T>where
T: Sync,
impl<T> Unpin for ParseResultWithWarnings<T>where
T: Unpin,
impl<T> UnwindSafe for ParseResultWithWarnings<T>where
T: UnwindSafe,
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