fn auto_interfaces() -> Vec<Interface> {
    // With specified IP address
    let mut inters: Vec<Interface> = interfaces()
        .into_iter()
        .filter(|inter| !inter.ip_addrs[0].is_unspecified())
        .collect();
    // Is up
    if inters.len() > 1 {
        inters = inters.into_iter().filter(|inter| inter.is_up).collect();
    }

    inters
}
/// Gets a list of available network interfaces which is possibly can be used for the current machine.
Gets a list of available network interfaces which is possibly can be used for the current machine.
Gets a list of available network interfaces which is possibly can be used for the current machine .
fn auto_interfaces() -> Vec<Interface> {
    // With specified IP address
    let mut inters: Vec<Interface> = interfaces()
        .into_iter()
        .filter(|inter| !inter.ip_addrs[0].is_unspecified())
        .collect();
    // Is up
    if inters.len() > 1 {
        inters = inters.into_iter().filter(|inter| inter.is_up).collect();
    }
    inters
}
fn auto_interfaces ( ) -> Vec < Interface > { // With specified IP address let mut inters : Vec < Interface > = interfaces ( ) . into_iter ( ) . filter ( | inter | ! inter . ip_addrs [ 0 ] . is_unspecified ( ) ) . collect ( ) ; // Is up if inters . len ( ) > 1 { inters = inters . into_iter ( ) . filter ( | inter | inter . is_up ) . collect ( ) ; } inters }
Gets a list of available network interfaces which is possibly can be used for the current machine.
Gets a list of available network interfaces which is possibly can be used for the current machine .