Struct picogrep::Config [] [src]

pub struct Config {
    pub query: String,
    pub filename: String,
}

A struct which store's picogrep's configuration

Fields

The plaintext query or regex pattern to search for

The file to search in

Methods

impl Config
[src]

[src]

Create a new Config from the provided command line arguments.

Examples

use picogrep::Config;

match Config::new(std::env::args()) {
    Ok(config) => println!("{:?}", config),
    Err(err) => eprintln!("An error occurred: {}", err),
};

Trait Implementations

impl Debug for Config
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Config

impl Sync for Config