Struct zcking_minigrep::Config [] [src]

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

Holds the command-line arguments given.

Examples

extern crate zcking_minigrep;

let config = zcking_minigrep::Config {
    query: String::from("Ishmael"),
    filename: String::from("moby_dick.txt"),
    case_sensitive: true,
};

Fields

The term to search for

Path to the file to search in

Whether case should be ignored or not when searching

Methods

impl Config
[src]

[src]

Creates a new Config by parsing arguments.

Errors

If the query or filename arguments were omitted, an error will be returned with a message indicating as such.

Trait Implementations

Auto Trait Implementations

impl Send for Config

impl Sync for Config