pub struct IssueCollection { /* private fields */ }Expand description
A collection of issues.
Implementations§
Source§impl IssueCollection
impl IssueCollection
pub fn new() -> Self
pub fn from(issues: impl IntoIterator<Item = Issue>) -> Self
pub fn push(&mut self, issue: Issue)
pub fn extend(&mut self, issues: impl IntoIterator<Item = Issue>)
pub fn shrink_to_fit(&mut self)
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Sourcepub fn with_maximum_level(self, level: Level) -> Self
pub fn with_maximum_level(self, level: Level) -> Self
Filters the issues in the collection to only include those with a severity level lower than or equal to the given level.
Sourcepub fn with_minimum_level(self, level: Level) -> Self
pub fn with_minimum_level(self, level: Level) -> Self
Filters the issues in the collection to only include those with a severity level higher than or equal to the given level.
Sourcepub fn has_minimum_level(&self, level: Level) -> bool
pub fn has_minimum_level(&self, level: Level) -> bool
Returns true if the collection contains any issues with a severity level
higher than or equal to the given level.
Sourcepub fn get_level_count(&self, level: Level) -> usize
pub fn get_level_count(&self, level: Level) -> usize
Returns the number of issues in the collection with the given severity level.
Sourcepub fn get_highest_level(&self) -> Option<Level>
pub fn get_highest_level(&self) -> Option<Level>
Returns the highest severity level of the issues in the collection.
pub fn with_code(self, code: impl Into<String>) -> IssueCollection
pub fn take_suggestions( &mut self, ) -> impl Iterator<Item = (SourceIdentifier, FixPlan)> + '_
pub fn only_fixable(self) -> impl Iterator<Item = Issue>
Sourcepub fn sorted(self) -> Self
pub fn sorted(self) -> Self
Sorts the issues in the collection.
The issues are sorted by severity level in descending order, then by code in ascending order, and finally by the primary annotation span.
pub fn iter(&self) -> impl Iterator<Item = &Issue>
pub fn to_fix_plans(self) -> HashMap<SourceIdentifier, FixPlan>
Trait Implementations§
Source§impl Clone for IssueCollection
impl Clone for IssueCollection
Source§fn clone(&self) -> IssueCollection
fn clone(&self) -> IssueCollection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IssueCollection
impl Debug for IssueCollection
Source§impl Default for IssueCollection
impl Default for IssueCollection
Source§impl<'de> Deserialize<'de> for IssueCollection
impl<'de> Deserialize<'de> for IssueCollection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromIterator<Issue> for IssueCollection
impl FromIterator<Issue> for IssueCollection
Source§impl Hash for IssueCollection
impl Hash for IssueCollection
Source§impl IntoIterator for IssueCollection
impl IntoIterator for IssueCollection
Source§impl PartialEq for IssueCollection
impl PartialEq for IssueCollection
Source§impl Serialize for IssueCollection
impl Serialize for IssueCollection
impl Eq for IssueCollection
impl StructuralPartialEq for IssueCollection
Auto Trait Implementations§
impl Freeze for IssueCollection
impl RefUnwindSafe for IssueCollection
impl Send for IssueCollection
impl Sync for IssueCollection
impl Unpin for IssueCollection
impl UnwindSafe for IssueCollection
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