pub enum Filter {
Include(FilterRule),
Exclude(FilterRule),
}
Expand description
A filter to determine if a file or path should be added to the Pipeline
.
Variants§
Include(FilterRule)
Exclude(FilterRule)
Implementations§
Source§impl Filter
impl Filter
Sourcepub fn include_extension<S: Into<String>>(ext: S) -> Self
pub fn include_extension<S: Into<String>>(ext: S) -> Self
Create a filter that includes a file extension.
Can panic, see FilterRule::extension
.
Sourcepub fn exclude_extension<S: Into<String>>(ext: S) -> Self
pub fn exclude_extension<S: Into<String>>(ext: S) -> Self
Create a filter that excludes a file extension.
Can panic, see FilterRule::extension
.
Sourcepub fn include_regex<S: AsRef<str>>(regex_str: S) -> Self
pub fn include_regex<S: AsRef<str>>(regex_str: S) -> Self
Create a filter that includes a regex.
Can panic, see FilterRule::regex
.
Sourcepub fn exclude_regex<S: AsRef<str>>(regex_str: S) -> Self
pub fn exclude_regex<S: AsRef<str>>(regex_str: S) -> Self
Create a filter that excludes a regex.
Can panic, see FilterRule::regex
.
pub fn matches<P: AsRef<Path>>(&self, relative_path: P) -> bool
Auto Trait Implementations§
impl Freeze for Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
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