Struct grep_cli::DecompressionReaderBuilder [−][src]
pub struct DecompressionReaderBuilder { /* fields omitted */ }
Expand description
Configures and builds a streaming reader for decompressing data.
Implementations
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
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for DecompressionReaderBuilder
impl Send for DecompressionReaderBuilder
impl Sync for DecompressionReaderBuilder
impl Unpin for DecompressionReaderBuilder
impl UnwindSafe for DecompressionReaderBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more