pub enum RuleSeverity {
Info,
Warning,
Error,
Critical,
}Expand description
规则违规的严重级别
从低到高依次为 Info < Warning < Error < Critical。
RuleReport::has_errors 将 Error 与 Critical 均视为阻断级。
Variants§
Implementations§
Source§impl RuleSeverity
impl RuleSeverity
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
返回级别的中文描述
Sourcepub fn is_blocking(&self) -> bool
pub fn is_blocking(&self) -> bool
是否为阻断级(Error 或 Critical)
Trait Implementations§
Source§impl Clone for RuleSeverity
impl Clone for RuleSeverity
Source§fn clone(&self) -> RuleSeverity
fn clone(&self) -> RuleSeverity
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 moreimpl Copy for RuleSeverity
Source§impl Debug for RuleSeverity
impl Debug for RuleSeverity
Source§impl Display for RuleSeverity
impl Display for RuleSeverity
impl Eq for RuleSeverity
Source§impl Hash for RuleSeverity
impl Hash for RuleSeverity
Source§impl Ord for RuleSeverity
impl Ord for RuleSeverity
Source§fn cmp(&self, other: &RuleSeverity) -> Ordering
fn cmp(&self, other: &RuleSeverity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RuleSeverity
impl PartialEq for RuleSeverity
Source§impl PartialOrd for RuleSeverity
impl PartialOrd for RuleSeverity
impl StructuralPartialEq for RuleSeverity
Auto Trait Implementations§
impl Freeze for RuleSeverity
impl RefUnwindSafe for RuleSeverity
impl Send for RuleSeverity
impl Sync for RuleSeverity
impl Unpin for RuleSeverity
impl UnsafeUnpin for RuleSeverity
impl UnwindSafe for RuleSeverity
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