Struct picogrep::Config [] [src]

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

A struct which store's picogrep's configuration


The plaintext query or regex pattern to search for

The file to search in


impl Config


Create a new Config from the provided command line arguments.


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


Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Config

impl Sync for Config