[−][src]Struct grep_cli::DecompressionMatcherBuilder
A builder for a matcher that determines which files get decompressed.
Methods
impl DecompressionMatcherBuilder
[src]
pub fn new() -> DecompressionMatcherBuilder
[src]
Create a new builder for configuring a decompression matcher.
pub fn build(&self) -> Result<DecompressionMatcher, CommandError>
[src]
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]
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]
&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]
fn clone(&self) -> DecompressionMatcherBuilder
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for DecompressionMatcherBuilder
[src]
impl Debug for DecompressionMatcherBuilder
[src]
Auto Trait Implementations
impl Send for DecompressionMatcherBuilder
impl Sync for DecompressionMatcherBuilder
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,