/// Print usage and exit the process with a given exit code.
Print usage and exit the process with a given exit code.
Print usage and exit the process with a given exit code .
fn usage(exit_code: i32) -> ! {
    println!("USAGE: arrow-client arr-host[:arr-port] [OPTIONS]\n");
    println!("    arr-host  Angelcam Arrow Service host");
    println!("    arr-port  Angelcam Arrow Service port\n");
    println!("OPTIONS:\n");
    println!("    -i iface  ethernet interface used for client identification (the first");
    println!("              configured network interface is used by default)");
    println!("    -c path   path to a CA certificate for Arrow Service identity verification;");
    println!("              in case the path is a directory, it's scanned recursively for");
    println!("              all files with the following extensions:\n");
    println!("              .der");
    println!("              .cer");
    println!("              .crr");
    println!("              .pem\n");
    if cfg!(feature = "discovery") {
        println!("    -d        automatic service discovery");
    }
    println!("    -r URL    add a given RTSP service");
    println!("    -m URL    add a given MJPEG service");
    println!("    -h addr   add a given HTTP service (addr must be in the \"host:port\"");
    println!("              format)");
    println!("    -t addr   add a given TCP service (addr must be in the \"host:port\"");
    println!("              format)");
    println!("    -v        enable debug logs\n");
    println!("    --config-file=path  alternative path to the client configuration file");
    println!("                        (default value: /etc/arrow/config.json)");
    println!("    --conn-state-file=path  alternative path to the client connection state");
    println!("                        file (default value: /var/lib/arrow/state)");
    println!("    --diagnostic-mode   start the client in diagnostic mode (i.e. the client");
    println!("                        will try to connect to a given Arrow Service and it");
    println!("                        will report success as its exit code; note: the");
    println!("                        \"access denied\" response from the server is also");
    println!("                        considered as a success)");
    println!("    --log-stderr        send log messages into stderr instead of syslog");
    println!("    --log-stderr-pretty  send log messages into stderr instead of syslog and");
    println!("                        use colored messages");
    println!("    --log-file=path     send log messages into a given file instead of syslog");
    println!("    --log-file-size=n   size limit for the log file (in bytes; default value:");
    println!("                        10240)");
    println!("    --log-file-rotations=n  number of backup files (i.e. rotations) for the");
    println!("                        log file (default value: 1)");
    if cfg!(feature = "discovery") {
        println!("    --rtsp-paths=path   alternative path to a file containing list of RTSP");
        println!("                        paths used on service discovery (default value:");
        println!("                        /etc/arrow/rtsp-paths)");
        println!("    --mjpeg-paths=path  alternative path to a file containing list of MJPEG");
        println!("                        paths used on service discovery (default value:");
        println!("                        /etc/arrow/mjpeg-paths)\n");
    } else {
        println!("");
    }
    process::exit(exit_code);
}
fn usage ( exit_code : i32 ) -> ! { println ! ( " \n " ) ; println ! ( " " ) ; println ! ( " \n " ) ; println ! ( " \n " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " \n " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " \n " ) ; if cfg ! ( feature " " ) { println ! ( " " ) ; } println ! ( " " ) ; println ! ( " " ) ; println ! ( " \" \" " ) ; println ! ( " " ) ; println ! ( " \" \" " ) ; println ! ( " " ) ; println ! ( " \n " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " \" \" " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; if cfg ! ( feature " " ) { println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; println ! ( " \n " ) ; } else { println ! ( " " ) ; } process :: exit ( exit_code ) ; }
Print usage and exit the process with a given exit code.
Print usage and exit the process with a given exit code .
exit_code
i32