Struct grep_cli::DecompressionMatcherBuilder [−][src]
pub struct DecompressionMatcherBuilder { /* fields omitted */ }
A builder for a matcher that determines which files get decompressed.
Methods
impl DecompressionMatcherBuilder
[src]
impl DecompressionMatcherBuilder
pub fn new() -> DecompressionMatcherBuilder
[src]
pub fn new() -> DecompressionMatcherBuilder
Create a new builder for configuring a decompression matcher.
pub fn build(&self) -> Result<DecompressionMatcher, CommandError>
[src]
pub fn build(&self) -> Result<DecompressionMatcher, CommandError>
Build a matcher for determining how to decompress files.
If there was a problem compiling the matcher, then an error is returned.
pub fn defaults(&mut self, yes: bool) -> &mut DecompressionMatcherBuilder
[src]
pub fn defaults(&mut self, yes: bool) -> &mut DecompressionMatcherBuilder
When enabled, the default matching rules will be compiled into this matcher before any other associations. When disabled, only the rules explicitly given to this builder will be used.
This is enabled by default.
pub fn associate<P, I, A>(
&mut self,
glob: &str,
program: P,
args: I
) -> &mut DecompressionMatcherBuilder where
P: AsRef<OsStr>,
I: IntoIterator<Item = A>,
A: AsRef<OsStr>,
[src]
pub fn associate<P, I, A>(
&mut self,
glob: &str,
program: P,
args: I
) -> &mut DecompressionMatcherBuilder where
P: AsRef<OsStr>,
I: IntoIterator<Item = A>,
A: AsRef<OsStr>,
Associates a glob with a command to decompress files matching the glob.
If multiple globs match the same file, then the most recently added glob takes precedence.
The syntax for the glob is documented in the
globset
crate.
Trait Implementations
impl Clone for DecompressionMatcherBuilder
[src]
impl Clone for DecompressionMatcherBuilder
fn clone(&self) -> DecompressionMatcherBuilder
[src]
fn clone(&self) -> DecompressionMatcherBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for DecompressionMatcherBuilder
[src]
impl Debug for DecompressionMatcherBuilder
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for DecompressionMatcherBuilder
[src]
impl Default for DecompressionMatcherBuilder
fn default() -> DecompressionMatcherBuilder
[src]
fn default() -> DecompressionMatcherBuilder
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for DecompressionMatcherBuilder
impl Send for DecompressionMatcherBuilder
impl Sync for DecompressionMatcherBuilder
impl Sync for DecompressionMatcherBuilder