/// Update state based on the new reachability info.
Update state based on the new reachability info.
Update state based on the new reachability info .
pub fn update_state(&mut self, id: Id, mut new_info: ReachabilityInfo) {
        let updated = self.interface_state.update_on_change(id, &mut new_info);
        if !updated.is_empty() {
            // Count number of state updates.
            *self.stats.state_updates.entry(id).or_insert(0) += 1;
            let system_updated =
                update_system_state(id, &updated, &mut self.system_state, &self.interface_state.0);
            let () = self.report_system_updated(system_updated);
            let () = self.report_updated(id, updated);
        }
    }
pub fn update_state ( & mut self , id : Id , mut new_info : ReachabilityInfo ) { let updated = self . interface_state . update_on_change ( id , & mut new_info ) ; if ! updated . is_empty ( ) { // Count number of state updates. * self . stats . state_updates . entry ( id ) . or_insert ( 0 ) += 1 ; let system_updated = update_system_state ( id , & updated , & mut self . system_state , & self . interface_state . 0 ) ; let ( ) = self . report_system_updated ( system_updated ) ; let ( ) = self . report_updated ( id , updated ) ; } }
Update state based on the new reachability info.
Update state based on the new reachability info .
&mut self
id
Id
new_info
ReachabilityInfo