Enum includer_codegen::utils::Filter [−][src]
pub enum Filter { Include(FilterRule), Exclude(FilterRule), }
A filter to determine if a file or path should be added to the Pipeline
.
Variants
Include(FilterRule)
Exclude(FilterRule)
Methods
impl Filter
[src]
impl Filter
pub fn include_extension<S: Into<String>>(ext: S) -> Self
[src]
pub fn include_extension<S: Into<String>>(ext: S) -> Self
Create a filter that includes a file extension.
Can panic, see FilterRule::extension
.
pub fn exclude_extension<S: Into<String>>(ext: S) -> Self
[src]
pub fn exclude_extension<S: Into<String>>(ext: S) -> Self
Create a filter that excludes a file extension.
Can panic, see FilterRule::extension
.
pub fn include_regex<S: AsRef<str>>(regex_str: S) -> Self
[src]
pub fn include_regex<S: AsRef<str>>(regex_str: S) -> Self
Create a filter that includes a regex.
Can panic, see FilterRule::regex
.
pub fn exclude_regex<S: AsRef<str>>(regex_str: S) -> Self
[src]
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
[src]
pub fn matches<P: AsRef<Path>>(&self, relative_path: P) -> bool