[][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]

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

Blanket Implementations

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

type Owned = T

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.