1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
use structopt::StructOpt;

/// Search for a pattern in a file and display the lines that contain it.
#[derive(Clone, StructOpt, Debug)]
pub struct Config {
    /// The URL to hit
    pub url: String,
    /// Response should match
    #[structopt(short, long)]
    pub matches: Option<String>,
    /// Response should not match
    #[structopt(short, long)]
    pub excludes: Option<String>,
    /// Request timeout in seconds
    #[structopt(short = "t", long = "timeout", default_value = "5")]
    pub timeout: usize,
    /// Parallelism
    #[structopt(short = "p", long = "parallelism", default_value = "2")]
    pub parallelism: usize,
}