pub enum Severity {
Bug,
Warning,
Suggestion,
Info,
}Expand description
Issue severity level for review comments.
§Examples
use argus_core::Severity;
let s: Severity = serde_json::from_str("\"bug\"").unwrap();
assert_eq!(s, Severity::Bug);Variants§
Bug
A likely defect that should be fixed.
Warning
A potential issue worth investigating.
Suggestion
An optional improvement.
Info
Informational observation.
Implementations§
Source§impl Severity
impl Severity
Sourcepub fn meets_threshold(self, threshold: Severity) -> bool
pub fn meets_threshold(self, threshold: Severity) -> bool
Returns true if self is at least as severe as threshold.
Severity order: Bug > Warning > Suggestion > Info.
§Examples
use argus_core::Severity;
assert!(Severity::Bug.meets_threshold(Severity::Warning));
assert!(Severity::Warning.meets_threshold(Severity::Warning));
assert!(!Severity::Suggestion.meets_threshold(Severity::Warning));Trait Implementations§
Source§impl<'de> Deserialize<'de> for Severity
impl<'de> Deserialize<'de> for Severity
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
impl Copy for Severity
impl Eq for Severity
impl StructuralPartialEq for Severity
Auto Trait Implementations§
impl Freeze for Severity
impl RefUnwindSafe for Severity
impl Send for Severity
impl Sync for Severity
impl Unpin for Severity
impl UnsafeUnpin for Severity
impl UnwindSafe for Severity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.