fn create_matchers() -> ArgMatches<'static> {
    return App::new("Webserver")
        .version("0.1.0")
        .author("Jörg S, Julian Z")
        .about("A simple but fast server in rust")
        .arg(Arg::with_name("port")
            .short("p")
            .required(true)
            .long("port")
            .default_value("9000")
            .value_name("PORT")
            .validator(|value| valid_port(value))
            .help("The port the server will listen on")
            .takes_value(true))
        .arg(Arg::with_name("threads")
            .short("t")
            .required(true)
            .long("threads")
            .default_value("8")
            .value_name("THREADS")
            .validator(|value| valid_threads(value))
            .help("The amount of threads to handle the requests")
            .takes_value(true))
        .arg(Arg::with_name("ip")
            .short("ip")
            .required(true)
            .long("ip_address")
            .default_value("127.0.0.1")
            .validator(|value| valid_ip(value))
            .value_name("IP")
            .help("The IPv4 the server will listen on")
            .takes_value(true))
        .arg(Arg::with_name("dir")
            .short("d")
            .required(true)
            .long("directory")
            .default_value("_dist")
            .value_name("DIR")
            .help("The directory the server should serve")
            .takes_value(true))
        .arg(Arg::with_name("type")
            .short("y")
            .required(true)
            .long("server_type")
            .default_value("all")
            .validator(|value| valid_type(value))
            .value_name("TYPE")
            .help("The type of the server [threaded|event_loop|single_thread|all]. Event loop is only supported on BSD systems, and eventually linux.")
            .takes_value(true))
        .get_matches();
}
/// Creates the required CLI parser.
Creates the required CLI parser.
Creates the required CLI parser .
fn create_matchers() -> ArgMatches<'static> {
    return App::new("Webserver")
        .version("0.1.0")
        .author("Jörg S, Julian Z")
        .about("A simple but fast server in rust")
        .arg(Arg::with_name("port")
            .short("p")
            .required(true)
            .long("port")
            .default_value("9000")
            .value_name("PORT")
            .validator(|value| valid_port(value))
            .help("The port the server will listen on")
            .takes_value(true))
        .arg(Arg::with_name("threads")
            .short("t")
            .required(true)
            .long("threads")
            .default_value("8")
            .value_name("THREADS")
            .validator(|value| valid_threads(value))
            .help("The amount of threads to handle the requests")
            .takes_value(true))
        .arg(Arg::with_name("ip")
            .short("ip")
            .required(true)
            .long("ip_address")
            .default_value("127.0.0.1")
            .validator(|value| valid_ip(value))
            .value_name("IP")
            .help("The IPv4 the server will listen on")
            .takes_value(true))
        .arg(Arg::with_name("dir")
            .short("d")
            .required(true)
            .long("directory")
            .default_value("_dist")
            .value_name("DIR")
            .help("The directory the server should serve")
            .takes_value(true))
        .arg(Arg::with_name("type")
            .short("y")
            .required(true)
            .long("server_type")
            .default_value("all")
            .validator(|value| valid_type(value))
            .value_name("TYPE")
            .help("The type of the server [threaded|event_loop|single_thread|all]. Event loop is only supported on BSD systems, and eventually linux.")
            .takes_value(true))
        .get_matches();
}
fn create_matchers ( ) -> ArgMatches < ' static > { return App :: new ( " " ) . version ( " " ) . author ( " ) . about ( " " ) . arg ( Arg :: with_name ( " " ) . short ( " " ) . required ( true ) . long ( " " ) . default_value ( " " ) . value_name ( " " ) . validator ( | value | valid_port ( value ) ) . help ( " " ) . takes_value ( true ) ) . arg ( Arg :: with_name ( " " ) . short ( " " ) . required ( true ) . long ( " " ) . default_value ( " " ) . value_name ( " " ) . validator ( | value | valid_threads ( value ) ) . help ( " " ) . takes_value ( true ) ) . arg ( Arg :: with_name ( " " ) . short ( " " ) . required ( true ) . long ( " " ) . default_value ( " " ) . validator ( | value | valid_ip ( value ) ) . value_name ( " " ) . help ( " " ) . takes_value ( true ) ) . arg ( Arg :: with_name ( " " ) . short ( " " ) . required ( true ) . long ( " " ) . default_value ( " " ) . value_name ( " " ) . help ( " " ) . takes_value ( true ) ) . arg ( Arg :: with_name ( " " ) . short ( " " ) . required ( true ) . long ( " " ) . default_value ( " " ) . validator ( | value | valid_type ( value ) ) . value_name ( " " ) . help ( " " ) . takes_value ( true ) ) . get_matches ( ) ; }
Creates the required CLI parser.
Creates the required CLI parser .