pub struct RuleReport {
pub violations: Vec<RuleViolation>,
}Expand description
规则检查汇总报告
Fields§
§violations: Vec<RuleViolation>所有违规项
Implementations§
Source§impl RuleReport
impl RuleReport
Sourcepub fn has_violations(&self) -> bool
pub fn has_violations(&self) -> bool
是否存在违规
Sourcepub fn has_blocking(&self) -> bool
pub fn has_blocking(&self) -> bool
是否存在阻断级违规(Error 或 Critical)
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
是否存在 Error 级违规
Sourcepub fn has_critical(&self) -> bool
pub fn has_critical(&self) -> bool
是否存在 Critical 级违规
Sourcepub fn count_by_severity(&self, severity: RuleSeverity) -> usize
pub fn count_by_severity(&self, severity: RuleSeverity) -> usize
返回指定级别的违规数量
Sourcepub fn violations_by_severity(
&self,
severity: RuleSeverity,
) -> Vec<&RuleViolation>
pub fn violations_by_severity( &self, severity: RuleSeverity, ) -> Vec<&RuleViolation>
返回指定级别的违规引用列表
Sourcepub fn blocking_violations(&self) -> Vec<&RuleViolation>
pub fn blocking_violations(&self) -> Vec<&RuleViolation>
返回阻断级违规引用列表
Sourcepub fn violation_count(&self) -> usize
pub fn violation_count(&self) -> usize
违规总数
Trait Implementations§
Source§impl Clone for RuleReport
impl Clone for RuleReport
Source§fn clone(&self) -> RuleReport
fn clone(&self) -> RuleReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RuleReport
impl Debug for RuleReport
Source§impl Default for RuleReport
impl Default for RuleReport
Source§fn default() -> RuleReport
fn default() -> RuleReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuleReport
impl RefUnwindSafe for RuleReport
impl Send for RuleReport
impl Sync for RuleReport
impl Unpin for RuleReport
impl UnsafeUnpin for RuleReport
impl UnwindSafe for RuleReport
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