Struct grep_cli::DecompressionMatcher [−][src]
pub struct DecompressionMatcher { /* fields omitted */ }
A matcher for determining how to decompress files.
Methods
impl DecompressionMatcher
[src]
impl DecompressionMatcher
pub fn new() -> DecompressionMatcher
[src]
pub fn new() -> DecompressionMatcher
Create a new matcher with default rules.
To add more matching rules, build a matcher with
DecompressionMatcherBuilder
.
pub fn command<P: AsRef<Path>>(&self, path: P) -> Option<Command>
[src]
pub fn command<P: AsRef<Path>>(&self, path: P) -> Option<Command>
Return a pre-built command based on the given file path that can
decompress its contents. If no such decompressor is known, then this
returns None
.
If there are multiple possible commands matching the given path, then the command added last takes precedence.
pub fn has_command<P: AsRef<Path>>(&self, path: P) -> bool
[src]
pub fn has_command<P: AsRef<Path>>(&self, path: P) -> bool
Returns true if and only if the given file path has at least one matching command to perform decompression on.
Trait Implementations
impl Clone for DecompressionMatcher
[src]
impl Clone for DecompressionMatcher
fn clone(&self) -> DecompressionMatcher
[src]
fn clone(&self) -> DecompressionMatcher
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for DecompressionMatcher
[src]
impl Debug for DecompressionMatcher
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for DecompressionMatcher
[src]
impl Default for DecompressionMatcher
fn default() -> DecompressionMatcher
[src]
fn default() -> DecompressionMatcher
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for DecompressionMatcher
impl Send for DecompressionMatcher
impl Sync for DecompressionMatcher
impl Sync for DecompressionMatcher