pub enum Severity {
Blocking,
NonBlocking,
Nit,
}Expand description
Only Blocking gates a merge. This is the whole defence against the
nitpick spiral: a competent reviewer can always find something, so
“no objections remaining” is not a stopping condition but “no blocking
objections” is.
Variants§
Implementations§
Source§impl Severity
impl Severity
pub fn as_str(self) -> &'static str
Sourcepub fn parse_lenient(text: &str) -> Option<Self>
pub fn parse_lenient(text: &str) -> Option<Self>
Accept the canonical spelling, any listed alias, and any difference in case, spacing, hyphens, or underscores.
pub fn valid_values() -> String
Source§impl Severity
impl Severity
Sourcepub fn rank(self) -> u8
pub fn rank(self) -> u8
How badly it matters, independent of the order the variants happen to
be declared in. Relying on derived Ord here would silently invert the
moment somebody reorders the enum.
Sourcepub fn graver(self, other: Self) -> Self
pub fn graver(self, other: Self) -> Self
The graver of two judgements.
Two reviewers disagreeing about severity is resolved upward on purpose. Nothing here gates a merge, it is all advice to a person, and advice that under-reports a real defect is worse than advice that over-reports a small one.
Trait Implementations§
impl Copy for Severity
Source§impl<'de> Deserialize<'de> for Severity
impl<'de> Deserialize<'de> for Severity
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
impl Eq for Severity
Source§impl Ord for Severity
impl Ord for Severity
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Severity
impl PartialOrd 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.