pub struct DotfileProtectionConfig {Show 14 fields
pub enabled: bool,
pub require_explicit_confirmation: bool,
pub audit_logging_enabled: bool,
pub audit_log_path: String,
pub prevent_cascading_modifications: bool,
pub create_backups: bool,
pub backup_directory: String,
pub max_backups_per_file: usize,
pub preserve_permissions: bool,
pub whitelist: IndexSet<String>,
pub additional_protected_patterns: Vec<String>,
pub block_during_automation: bool,
pub blocked_operations: Vec<String>,
pub require_secondary_auth_for_whitelist: bool,
}Expand description
Dotfile protection configuration.
Fields§
§enabled: boolEnable dotfile protection globally.
require_explicit_confirmation: boolRequire explicit user confirmation for any dotfile modification.
audit_logging_enabled: boolEnable immutable audit logging of all dotfile access attempts.
audit_log_path: StringPath to the audit log file.
prevent_cascading_modifications: boolPrevent cascading modifications (one dotfile change triggering others).
create_backups: boolCreate backup before any permitted modification.
backup_directory: StringDirectory for storing dotfile backups.
max_backups_per_file: usizeMaximum number of backups to retain per file.
preserve_permissions: boolPreserve original file permissions and ownership.
whitelist: IndexSet<String>Whitelisted dotfiles that can be modified (after secondary confirmation).
additional_protected_patterns: Vec<String>Additional dotfile patterns to protect (beyond defaults).
block_during_automation: boolBlock modifications during automated operations.
blocked_operations: Vec<String>Operations that trigger extra protection.
require_secondary_auth_for_whitelist: boolSecondary authentication required for whitelisted files.
Implementations§
Source§impl DotfileProtectionConfig
impl DotfileProtectionConfig
Sourcepub fn is_protected(&self, path: &str) -> bool
pub fn is_protected(&self, path: &str) -> bool
Check if a file path matches a protected dotfile pattern.
Sourcepub fn is_whitelisted(&self, path: &str) -> bool
pub fn is_whitelisted(&self, path: &str) -> bool
Check if a file is in the whitelist.
Trait Implementations§
Source§impl Clone for DotfileProtectionConfig
impl Clone for DotfileProtectionConfig
Source§fn clone(&self) -> DotfileProtectionConfig
fn clone(&self) -> DotfileProtectionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DotfileProtectionConfig
impl Debug for DotfileProtectionConfig
Source§impl Default for DotfileProtectionConfig
impl Default for DotfileProtectionConfig
Source§impl<'de> Deserialize<'de> for DotfileProtectionConfig
impl<'de> Deserialize<'de> for DotfileProtectionConfig
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>,
Source§impl JsonSchema for DotfileProtectionConfig
impl JsonSchema for DotfileProtectionConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for DotfileProtectionConfig
impl RefUnwindSafe for DotfileProtectionConfig
impl Send for DotfileProtectionConfig
impl Sync for DotfileProtectionConfig
impl Unpin for DotfileProtectionConfig
impl UnsafeUnpin for DotfileProtectionConfig
impl UnwindSafe for DotfileProtectionConfig
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<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