pub struct DestructiveConfig {
pub patterns: Vec<String>,
pub replace_defaults: bool,
}Expand description
[destructive] section of wallfacer.toml. By default user
patterns are layered on top of the built-in keyword list (delete,
drop, …). Set replace_defaults = true to opt out of the
built-ins entirely.
[destructive]
patterns = ["^remove_.*$", "^drop_.*$"]
# replace_defaults = true # uncomment to disable built-insFields§
§patterns: Vec<String>Regex patterns matched against tool names. Layered on top of the
built-in keyword detector unless Self::replace_defaults is
set.
replace_defaults: boolWhen true, the default keyword detector is disabled and only
Self::patterns decides which tools are destructive.
Default false is additive: an operator who adds one custom
pattern still gets the protection from the built-in keywords
like delete, drop, destroy, …
Trait Implementations§
Source§impl Clone for DestructiveConfig
impl Clone for DestructiveConfig
Source§fn clone(&self) -> DestructiveConfig
fn clone(&self) -> DestructiveConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 DestructiveConfig
impl Debug for DestructiveConfig
Source§impl Default for DestructiveConfig
impl Default for DestructiveConfig
Source§fn default() -> DestructiveConfig
fn default() -> DestructiveConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DestructiveConfig
impl<'de> Deserialize<'de> for DestructiveConfig
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
Auto Trait Implementations§
impl Freeze for DestructiveConfig
impl RefUnwindSafe for DestructiveConfig
impl Send for DestructiveConfig
impl Sync for DestructiveConfig
impl Unpin for DestructiveConfig
impl UnsafeUnpin for DestructiveConfig
impl UnwindSafe for DestructiveConfig
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