pub enum ReviewVote {
Approve,
ApproveWithFindings,
Reject,
}Expand description
A reviewer seat’s verdict on the patch, cast alongside its findings.
Three values, not a boolean, because “fine to proceed” and “fine, but
look at these” are different signals for the operator watching the run —
collapsing them would hide exactly the middle case a lens-based reviewer
is most likely to land on. Ord follows declaration order (least to most
cautious) so a round’s ReviewVote::worst is a plain max, the same
trick Severity uses for blocks.
Variants§
Approve
No reservations.
ApproveWithFindings
Fine to proceed, but the findings below are worth fixing.
Reject
Do not proceed as-is.
Implementations§
Source§impl ReviewVote
impl ReviewVote
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
Operator-facing label, used in events and the report — never
Debug, so a rename of a variant does not silently reword history.
Sourcepub fn worst(votes: impl IntoIterator<Item = Self>) -> Option<Self>
pub fn worst(votes: impl IntoIterator<Item = Self>) -> Option<Self>
The most cautious of a set of votes, or None if none were cast.
A round’s recorded verdict must never read softer than its most cautious seat — the same reason a single blocking finding, not an average of severities, decides whether a round is clean.
Trait Implementations§
Source§impl Clone for ReviewVote
impl Clone for ReviewVote
Source§fn clone(&self) -> ReviewVote
fn clone(&self) -> ReviewVote
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReviewVote
Source§impl Debug for ReviewVote
impl Debug for ReviewVote
Source§impl<'de> Deserialize<'de> for ReviewVote
impl<'de> Deserialize<'de> for ReviewVote
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>,
impl Eq for ReviewVote
Source§impl Ord for ReviewVote
impl Ord for ReviewVote
Source§fn cmp(&self, other: &ReviewVote) -> Ordering
fn cmp(&self, other: &ReviewVote) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ReviewVote
impl PartialEq for ReviewVote
Source§impl PartialOrd for ReviewVote
impl PartialOrd for ReviewVote
Source§impl Serialize for ReviewVote
impl Serialize for ReviewVote
impl StructuralPartialEq for ReviewVote
Auto Trait Implementations§
impl Freeze for ReviewVote
impl RefUnwindSafe for ReviewVote
impl Send for ReviewVote
impl Sync for ReviewVote
impl Unpin for ReviewVote
impl UnsafeUnpin for ReviewVote
impl UnwindSafe for ReviewVote
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more