[][src]Struct grep_cli::DecompressionMatcherBuilder

pub struct DecompressionMatcherBuilder { /* fields omitted */ }

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]

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 Debug for DecompressionMatcherBuilder[src]

impl Default for DecompressionMatcherBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.