pub struct ValidationReport { /* private fields */ }Expand description
Aggregated result of validating a collection of ADRs.
Implementations§
Source§impl ValidationReport
impl ValidationReport
Sourcepub fn add_issue(&mut self, issue: ValidationIssue)
pub fn add_issue(&mut self, issue: ValidationIssue)
Adds an issue to the report.
Sourcepub fn add_issues(&mut self, issues: impl IntoIterator<Item = ValidationIssue>)
pub fn add_issues(&mut self, issues: impl IntoIterator<Item = ValidationIssue>)
Adds multiple issues to the report.
Sourcepub fn issues(&self) -> &[ValidationIssue]
pub fn issues(&self) -> &[ValidationIssue]
Returns all issues.
Sourcepub fn issues_by_severity(&self, severity: Severity) -> Vec<&ValidationIssue>
pub fn issues_by_severity(&self, severity: Severity) -> Vec<&ValidationIssue>
Returns issues filtered by severity.
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Returns the count of error-level issues.
Sourcepub fn warning_count(&self) -> usize
pub fn warning_count(&self) -> usize
Returns the count of warning-level issues.
Sourcepub fn errors(&self) -> Vec<&ValidationIssue>
pub fn errors(&self) -> Vec<&ValidationIssue>
Returns error-level issues.
Sourcepub fn warnings(&self) -> Vec<&ValidationIssue>
pub fn warnings(&self) -> Vec<&ValidationIssue>
Returns warning-level issues.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Returns true if there are any error-level issues.
Trait Implementations§
Source§impl Clone for ValidationReport
impl Clone for ValidationReport
Source§fn clone(&self) -> ValidationReport
fn clone(&self) -> ValidationReport
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 ValidationReport
impl Debug for ValidationReport
Source§impl Default for ValidationReport
impl Default for ValidationReport
Source§fn default() -> ValidationReport
fn default() -> ValidationReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValidationReport
impl RefUnwindSafe for ValidationReport
impl Send for ValidationReport
impl Sync for ValidationReport
impl Unpin for ValidationReport
impl UnwindSafe for ValidationReport
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