Struct grep_cli::DecompressionMatcher [−][src]
pub struct DecompressionMatcher { /* fields omitted */ }A matcher for determining how to decompress files.
Methods
impl DecompressionMatcher[src]
impl DecompressionMatcherpub fn new() -> DecompressionMatcher[src]
pub fn new() -> DecompressionMatcherCreate 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) -> boolReturns 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 DecompressionMatcherfn clone(&self) -> DecompressionMatcher[src]
fn clone(&self) -> DecompressionMatcherReturns 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 DecompressionMatcherfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for DecompressionMatcher[src]
impl Default for DecompressionMatcherfn default() -> DecompressionMatcher[src]
fn default() -> DecompressionMatcherReturns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for DecompressionMatcher
impl Send for DecompressionMatcherimpl Sync for DecompressionMatcher
impl Sync for DecompressionMatcher