// Called when `mdns` produces an event.
Called when `mdns` produces an event.
Called when ` mdns ` produces an event .
fn inject_event(&mut self, event: MdnsEvent) {
        match event {
            MdnsEvent::Discovered(list) => {
                for (peer, _) in list {
                    self.floodsub.add_node_to_partial_view(peer);
                }
            }
            MdnsEvent::Expired(list) => {
                for (peer, _) in list {
                    if !self.mdns.has_node(&peer) {
                        self.floodsub.remove_node_from_partial_view(&peer);
                    }
                }
            }
        }
    }
fn inject_event ( & mut self , event : MdnsEvent ) { match event { MdnsEvent :: Discovered ( list ) => { for ( peer , _ ) in list { self . floodsub . add_node_to_partial_view ( peer ) ; } } MdnsEvent :: Expired ( list ) => { for ( peer , _ ) in list { if ! self . mdns . has_node ( & peer ) { self . floodsub . remove_node_from_partial_view ( & peer ) ; } } } } }
Called when `mdns` produces an event.
Called when ` mdns ` produces an event .
&mut self
event
MdnsEvent