pub struct FileProtectionRule {
pub pattern: String,
pub protection_level: ProtectionLevel,
pub allowed_edit_types: HashSet<EditType>,
pub forbidden_patterns: Vec<String>,
pub required_patterns: Vec<String>,
pub max_lines_modified: Option<usize>,
pub reason: String,
}
Expand description
File-level protection rule
Fields§
§pattern: String
Pattern to match files (simple glob-style)
protection_level: ProtectionLevel
Protection level
allowed_edit_types: HashSet<EditType>
Allowed edit types
forbidden_patterns: Vec<String>
Forbidden patterns in content
required_patterns: Vec<String>
Required patterns that must remain
max_lines_modified: Option<usize>
Maximum lines that can be modified
reason: String
Justification for protection
Trait Implementations§
Source§impl Clone for FileProtectionRule
impl Clone for FileProtectionRule
Source§fn clone(&self) -> FileProtectionRule
fn clone(&self) -> FileProtectionRule
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 moreAuto Trait Implementations§
impl Freeze for FileProtectionRule
impl RefUnwindSafe for FileProtectionRule
impl Send for FileProtectionRule
impl Sync for FileProtectionRule
impl Unpin for FileProtectionRule
impl UnwindSafe for FileProtectionRule
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