pub struct DiagnosticsData {
pub issues_by_file: BTreeMap<String, Vec<Issue>>,
pub format: Option<DiagnosticsFormat>,
pub timestamp: u64,
}Expand description
Aggregated diagnostics data from one or more reports.
Fields§
§issues_by_file: BTreeMap<String, Vec<Issue>>§format: Option<DiagnosticsFormat>§timestamp: u64Implementations§
Source§impl DiagnosticsData
impl DiagnosticsData
pub fn new() -> Self
pub fn total_issues(&self) -> usize
pub fn count_by_severity(&self) -> BTreeMap<Severity, usize>
Sourcepub fn merge(&mut self, other: &DiagnosticsData)
pub fn merge(&mut self, other: &DiagnosticsData)
Merge another DiagnosticsData into this one, deduplicating by fingerprint.
Sourcepub fn issues_on_changed_lines(&self, diffs: &[FileDiff]) -> Vec<&Issue>
pub fn issues_on_changed_lines(&self, diffs: &[FileDiff]) -> Vec<&Issue>
Return issues that fall on changed lines in the given diffs.
Trait Implementations§
Source§impl Clone for DiagnosticsData
impl Clone for DiagnosticsData
Source§fn clone(&self) -> DiagnosticsData
fn clone(&self) -> DiagnosticsData
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 DiagnosticsData
impl Debug for DiagnosticsData
Source§impl Default for DiagnosticsData
impl Default for DiagnosticsData
Source§impl<'de> Deserialize<'de> for DiagnosticsData
impl<'de> Deserialize<'de> for DiagnosticsData
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
Auto Trait Implementations§
impl Freeze for DiagnosticsData
impl RefUnwindSafe for DiagnosticsData
impl Send for DiagnosticsData
impl Sync for DiagnosticsData
impl Unpin for DiagnosticsData
impl UnsafeUnpin for DiagnosticsData
impl UnwindSafe for DiagnosticsData
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