Struct grep_cli::DecompressionMatcherBuilder[][src]

pub struct DecompressionMatcherBuilder { /* fields omitted */ }
Expand description

A builder for a matcher that determines which files get decompressed.

Implementations

Create a new builder for configuring a decompression matcher.

Build a matcher for determining how to decompress files.

If there was a problem compiling the matcher, then an error is returned.

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.

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.

The program given is resolved with respect to PATH and turned into an absolute path internally before being executed by the current platform. Notably, on Windows, this avoids a security problem where passing a relative path to CreateProcess will automatically search the current directory for a matching program. If the program could not be resolved, then it is silently ignored and the association is dropped. For this reason, callers should prefer try_associate.

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.

The program given is resolved with respect to PATH and turned into an absolute path internally before being executed by the current platform. Notably, on Windows, this avoids a security problem where passing a relative path to CreateProcess will automatically search the current directory for a matching program. If the program could not be resolved, then an error is returned.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.