pub fn validate_multi(mode: Mode, protocol: TraceProtocol, targets: &[String]) {
    match (mode, protocol) {
        (Mode::Stream | Mode::Pretty | Mode::Markdown | Mode::Csv | Mode::Json, _)
            if targets.len() > 1 =>
        {
            eprintln!("only a single target may be specified for this mode");
            exit(-1);
        }
        (_, TraceProtocol::Tcp | TraceProtocol::Udp) if targets.len() > 1 => {
            eprintln!("only a single target may be specified for TCP and UDP tracing");
            exit(-1);
        }
        _ => {}
    }
}
/// We only allow multiple targets to be specified for the Tui and for `Icmp` tracing.
We only allow multiple targets to be specified for the Tui and for `Icmp` tracing.
We only allow multiple targets to be specified for the Tui and for ` Icmp ` tracing .
pub fn validate_multi(mode: Mode, protocol: TraceProtocol, targets: &[String]) {
    match (mode, protocol) {
        (Mode::Stream | Mode::Pretty | Mode::Markdown | Mode::Csv | Mode::Json, _)
            if targets.len() > 1 =>
        {
            eprintln!("only a single target may be specified for this mode");
            exit(-1);
        }
        (_, TraceProtocol::Tcp | TraceProtocol::Udp) if targets.len() > 1 => {
            eprintln!("only a single target may be specified for TCP and UDP tracing");
            exit(-1);
        }
        _ => {}
    }
}
pub fn validate_multi ( mode : Mode , protocol : TraceProtocol , targets : & [ String ] ) { match ( mode , protocol ) { ( Mode :: Stream | Mode :: Pretty | Mode :: Markdown | Mode :: Csv | Mode :: Json , _ ) if targets . len ( ) > 1 => { eprintln ! ( " " ) ; exit ( - 1 ) ; } ( _ , TraceProtocol :: Tcp | TraceProtocol :: Udp ) if targets . len ( ) > 1 => { eprintln ! ( " " ) ; exit ( - 1 ) ; } _ => { } } }
We only allow multiple targets to be specified for the Tui and for `Icmp` tracing.
We only allow multiple targets to be specified for the Tui and for ` Icmp ` tracing .
mode
Mode
protocol
TraceProtocol
targets
&[String]