async fn port_online(port: &netdev::PortProxy) {
        let (watcher, server) = endpoints::create_proxy().expect("failed to create watcher proxy");
        const WATCHER_BUFFER: u32 = 0;
        port.get_status_watcher(server, WATCHER_BUFFER).expect("failed to get watcher");
        loop {
            let flags =
                watcher.watch_status().await.expect("failed to watch status").flags.unwrap();
            if flags.contains(netdev::StatusFlags::Online) {
                return;
            }
        }
    }
// TODO(https://fxbug.dev/75533): We can do better when the rust client
// has direct support for port status watcher.
We can do better when the rust client
has direct support for port status watcher.
We can do better when the rust client has direct support for port status watcher .
async fn port_online(port: &netdev::PortProxy) {
        let (watcher, server) = endpoints::create_proxy().expect("failed to create watcher proxy");
        const WATCHER_BUFFER: u32 = 0;
        port.get_status_watcher(server, WATCHER_BUFFER).expect("failed to get watcher");
        loop {
            let flags =
                watcher.watch_status().await.expect("failed to watch status").flags.unwrap();
            if flags.contains(netdev::StatusFlags::Online) {
                return;
            }
        }
    }
async fn port_online ( port : & netdev :: PortProxy ) { let ( watcher , server ) = endpoints :: create_proxy ( ) . expect ( " " ) ; const WATCHER_BUFFER : u32 = 0 ; port . get_status_watcher ( server , WATCHER_BUFFER ) . expect ( " " ) ; loop { let flags = watcher . watch_status ( ) . await . expect ( " " ) . flags . unwrap ( ) ; if flags . contains ( netdev :: StatusFlags :: Online ) { return ; } } }
TODO(https://fxbug.dev/75533): We can do better when the rust client
has direct support for port status watcher.
TODO ( https : // fxbug . dev / 75533 ) : We can do better when the rust client has direct support for port status watcher .
port
&netdev::PortProxy
port
&netdev::PortProxy