pub async fn update_state_for_interface_watcher_event(
        &mut self,
        event: fnet_interfaces::Event,
    ) -> error::Result<()> {
        match event {
            fnet_interfaces::Event::Added(properties)
            | fnet_interfaces::Event::Existing(properties) => {
                let properties = fnet_interfaces_ext::Properties::try_from(properties)
                    .map_err(error::Lif::InvalidProperties)?;
                let () = self.notify_lif_added(properties)?;
            }
            fnet_interfaces::Event::Changed(changed) => {
                info!("property change {:?}", changed);
            }
            fnet_interfaces::Event::Removed(removed_id) => {
                info!("interface {} removed", removed_id);
            }
            fnet_interfaces::Event::Idle(fnet_interfaces::Empty {}) => {}
        }
        Ok(())
    }
/// Informs network manager of a network interface watcher event.
Informs network manager of a network interface watcher event.
Informs network manager of a network interface watcher event .
pub async fn update_state_for_interface_watcher_event(
        &mut self,
        event: fnet_interfaces::Event,
    ) -> error::Result<()> {
        match event {
            fnet_interfaces::Event::Added(properties)
            | fnet_interfaces::Event::Existing(properties) => {
                let properties = fnet_interfaces_ext::Properties::try_from(properties)
                    .map_err(error::Lif::InvalidProperties)?;
                let () = self.notify_lif_added(properties)?;
            }
            fnet_interfaces::Event::Changed(changed) => {
                info!("property change {:?}", changed);
            }
            fnet_interfaces::Event::Removed(removed_id) => {
                info!("interface {} removed", removed_id);
            }
            fnet_interfaces::Event::Idle(fnet_interfaces::Empty {}) => {}
        }
        Ok(())
    }
pub async fn update_state_for_interface_watcher_event ( & mut self , event : fnet_interfaces :: Event , ) -> error :: Result < ( ) > { match event { fnet_interfaces :: Event :: Added ( properties ) | fnet_interfaces :: Event :: Existing ( properties ) => { let properties = fnet_interfaces_ext :: Properties :: try_from ( properties ) . map_err ( error :: Lif :: InvalidProperties ) ? ; let ( ) = self . notify_lif_added ( properties ) ? ; } fnet_interfaces :: Event :: Changed ( changed ) => { info ! ( " " changed ) ; } fnet_interfaces :: Event :: Removed ( removed_id ) => { info ! ( " " removed_id ) ; } fnet_interfaces :: Event :: Idle ( fnet_interfaces :: Empty { } ) => { } } Ok ( ( ) ) }
Informs network manager of a network interface watcher event.
Informs network manager of a network interface watcher event .
&mut self
event
fnet_interfaces::Event
&mut self
event
fnet_interfaces::Event