Struct grep_cli::DecompressionReaderBuilder[][src]

pub struct DecompressionReaderBuilder { /* fields omitted */ }

Configures and builds a streaming reader for decompressing data.

Methods

impl DecompressionReaderBuilder
[src]

Create a new builder with the default configuration.

Build a new streaming reader for decompressing data.

If decompression is done out-of-process and if there was a problem spawning the process, then its error is logged at the debug level and a passthru reader is returned that does no decompression. This behavior typically occurs when the given file path matches a decompression command, but is executing in an environment where the decompression command is not available.

If the given file path could not be matched with a decompression strategy, then a passthru reader is returned that does no decompression.

Set the matcher to use to look up the decompression command for each file path.

A set of sensible rules is enabled by default. Setting this will completely replace the current rules.

Get the underlying matcher currently used by this builder.

When enabled, the reader will asynchronously read the contents of the command's stderr output. When disabled, stderr is only read after the stdout stream has been exhausted (or if the process quits with an error code).

Note that when enabled, this may require launching an additional thread in order to read stderr. This is done so that the process being executed is never blocked from writing to stdout or stderr. If this is disabled, then it is possible for the process to fill up the stderr buffer and deadlock.

This is enabled by default.

Trait Implementations

impl Clone for DecompressionReaderBuilder
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for DecompressionReaderBuilder
[src]

Formats the value using the given formatter. Read more

impl Default for DecompressionReaderBuilder
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations