pub struct AnalysisResults(/* private fields */);Expand description
A set of analysis results.
If successfully created, the set of analysis results are guaranteed not to have any associated errors (but they may contain diagnostics).
Implementations§
Source§impl AnalysisResults
impl AnalysisResults
Sourcepub fn try_new(
results: Vec<AnalysisResult>,
) -> Result<Self, NonEmpty<Arc<Error>>>
pub fn try_new( results: Vec<AnalysisResult>, ) -> Result<Self, NonEmpty<Arc<Error>>>
Attempts to create a new set of analysis results.
Returns any errors encountered during analysis. That being said, each analysis result may have diagnostics.
Sourcepub fn into_inner(self) -> Vec<AnalysisResult>
pub fn into_inner(self) -> Vec<AnalysisResult>
Consumes self and returns the inner vector of analysis results.
Sourcepub fn filter(
&self,
sources: &[&Source],
) -> impl Iterator<Item = &AnalysisResult>
pub fn filter( &self, sources: &[&Source], ) -> impl Iterator<Item = &AnalysisResult>
Attempts to find all analysis results that match any of the provided sources.
Sourcepub fn diagnostics(
&self,
) -> impl Iterator<Item = (Rc<String>, Rc<String>, &Diagnostic)>
pub fn diagnostics( &self, ) -> impl Iterator<Item = (Rc<String>, Rc<String>, &Diagnostic)>
Iterates over the diagnostics within the analysis result set.
The return type is an iterator that yields tuples that contain the following:
- The path to the file containing the diagnostic.
- The source of the file containing the diagnostic.
- A reference to the diagnostic itself.
Trait Implementations§
Source§impl Debug for AnalysisResults
impl Debug for AnalysisResults
Source§impl IntoIterator for AnalysisResults
impl IntoIterator for AnalysisResults
Auto Trait Implementations§
impl Freeze for AnalysisResults
impl RefUnwindSafe for AnalysisResults
impl Send for AnalysisResults
impl Sync for AnalysisResults
impl Unpin for AnalysisResults
impl UnwindSafe for AnalysisResults
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