pub async fn next(&mut self) -> Result<IfEvent> {
        loop {
            while let Some(event) = self.queue.pop_front() {
                match event {
                    IfEvent::Up(inet) => {
                        if self.addrs.insert(inet) {
                            return Ok(event);
                        }
                    }
                    IfEvent::Down(inet) => {
                        if self.addrs.remove(&inet) {
                            return Ok(event);
                        }
                    }
                }
            }
            self.watcher.recv_event(&mut self.queue).await?;
        }
    }
/// Returns a future for the next event.
Returns a future for the next event.
Returns a future for the next event .
pub async fn next(&mut self) -> Result<IfEvent> {
        loop {
            while let Some(event) = self.queue.pop_front() {
                match event {
                    IfEvent::Up(inet) => {
                        if self.addrs.insert(inet) {
                            return Ok(event);
                        }
                    }
                    IfEvent::Down(inet) => {
                        if self.addrs.remove(&inet) {
                            return Ok(event);
                        }
                    }
                }
            }
            self.watcher.recv_event(&mut self.queue).await?;
        }
    }
pub async fn next ( & mut self ) -> Result < IfEvent > { loop { while let Some ( event ) = self . queue . pop_front ( ) { match event { IfEvent :: Up ( inet ) => { if self . addrs . insert ( inet ) { return Ok ( event ) ; } } IfEvent :: Down ( inet ) => { if self . addrs . remove ( & inet ) { return Ok ( event ) ; } } } } self . watcher . recv_event ( & mut self . queue ) . await ? ; } }
Returns a future for the next event.
Returns a future for the next event .
&mut self
&mut self