pub enum Destructiveness {
Safe,
RequiresApproval {
reason: String,
},
RequiresApprovalAndDataLossWarning {
reason: String,
},
}Expand description
Risk classification for a single diff change.
Variants§
Safe
No approval required; the change cannot lose data on its own.
RequiresApproval
Requires explicit approval but is not a data-loss risk on success.
RequiresApprovalAndDataLossWarning
Requires explicit approval and warns of data loss.
Implementations§
Source§impl Destructiveness
impl Destructiveness
Sourcepub const fn requires_approval(&self) -> bool
pub const fn requires_approval(&self) -> bool
True when the change is anything other than Self::Safe.
Sourcepub const fn data_loss_risk(&self) -> bool
pub const fn data_loss_risk(&self) -> bool
True when the change is flagged as a data-loss risk.
Trait Implementations§
Source§impl Clone for Destructiveness
impl Clone for Destructiveness
Source§fn clone(&self) -> Destructiveness
fn clone(&self) -> Destructiveness
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 Destructiveness
impl Debug for Destructiveness
Source§impl<'de> Deserialize<'de> for Destructiveness
impl<'de> Deserialize<'de> for Destructiveness
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
Source§impl PartialEq for Destructiveness
impl PartialEq for Destructiveness
Source§fn eq(&self, other: &Destructiveness) -> bool
fn eq(&self, other: &Destructiveness) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Destructiveness
impl Serialize for Destructiveness
impl Eq for Destructiveness
impl StructuralPartialEq for Destructiveness
Auto Trait Implementations§
impl Freeze for Destructiveness
impl RefUnwindSafe for Destructiveness
impl Send for Destructiveness
impl Sync for Destructiveness
impl Unpin for Destructiveness
impl UnsafeUnpin for Destructiveness
impl UnwindSafe for Destructiveness
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<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>
Converts
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>
Converts
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