pub enum PatternInstruction {
    Root(String),
    Include(Pattern),
    Exclude(Pattern),
    ExcludeNoRecurse(Pattern),
}Expand description
A pattern instruction.
These instructions will be used for the --pattern command line parameter.
PatternInstruction::Include are useful to include paths that are contained in an excluded path. The first matching pattern is used so if an PatternInstruction::Include matches before an PatternInstruction::Exclude, the file is backed up. If an PatternInstruction::ExcludeNoRecurse pattern matches a directory, it won’t recurse into it and won’t discover any potential matches for include rules below that directory.
Variants§
Root(String)
A plain root path to use as a starting point
Include(Pattern)
Include matched files
Exclude(Pattern)
Exclude matched files
ExcludeNoRecurse(Pattern)
If an PatternInstruction::ExcludeNoRecurse pattern matches a directory, it won’t recurse into it and won’t discover any potential matches for include rules below that directory.
Trait Implementations§
Source§impl Clone for PatternInstruction
 
impl Clone for PatternInstruction
Source§fn clone(&self) -> PatternInstruction
 
fn clone(&self) -> PatternInstruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more