pub struct FilterRules {
pub excludes: Vec<Pattern>,
pub includes: Vec<Pattern>,
}Expand description
Compiled filter rules for include/exclude matching.
Fields§
§excludes: Vec<Pattern>§includes: Vec<Pattern>Implementations§
Source§impl FilterRules
impl FilterRules
Sourcepub fn new(exclude: &[String], include: &[String]) -> Self
pub fn new(exclude: &[String], include: &[String]) -> Self
Build filter rules from string patterns.
Sourcepub fn should_skip(&self, rel: &Path) -> bool
pub fn should_skip(&self, rel: &Path) -> bool
Returns true if the path should be skipped. A path is skipped if it matches any exclude pattern, UNLESS it also matches an include pattern (rsync semantics).
Auto Trait Implementations§
impl Freeze for FilterRules
impl RefUnwindSafe for FilterRules
impl Send for FilterRules
impl Sync for FilterRules
impl Unpin for FilterRules
impl UnsafeUnpin for FilterRules
impl UnwindSafe for FilterRules
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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