pub enum DestructiveEffect {
Delete,
Overwrite,
}Expand description
What a destructive verb would have done to the target it was refused.
The refusal message has to name the harm, and “would delete” is false for a verb that overwrites. Carrying the effect as an enum rather than a phrase keeps both locales honest: a third kind of harm cannot ship until the exhaustive match in each renderer is taught the word for it.
Variants§
Delete
The target and its contents would be removed (cache clear).
Overwrite
The target would be replaced in place (config init --force).
Trait Implementations§
Source§impl Clone for DestructiveEffect
impl Clone for DestructiveEffect
impl Copy for DestructiveEffect
Source§impl Debug for DestructiveEffect
impl Debug for DestructiveEffect
impl Eq for DestructiveEffect
Source§impl PartialEq for DestructiveEffect
impl PartialEq for DestructiveEffect
impl StructuralPartialEq for DestructiveEffect
Auto Trait Implementations§
impl Freeze for DestructiveEffect
impl RefUnwindSafe for DestructiveEffect
impl Send for DestructiveEffect
impl Sync for DestructiveEffect
impl Unpin for DestructiveEffect
impl UnsafeUnpin for DestructiveEffect
impl UnwindSafe for DestructiveEffect
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.