fn poll<TBehaviourIn>(
        &mut self,
        cx: &mut Context,
        _: &mut impl PollParameters,
    ) -> Poll<NetworkBehaviourAction<TBehaviourIn, ForestBehaviourEvent>> {
        // Poll to see if any response is ready to be sent back.
        while let Poll::Ready(Some(outcome)) = self.cx_pending_responses.poll_next_unpin(cx) {
            let RequestProcessingOutcome {
                inner_channel,
                response,
            } = match outcome {
                Some(outcome) => outcome,
                // The response builder was too busy and thus the request was dropped. This is
                // later on reported as a `InboundFailure::Omission`.
                None => continue,
            };

            self.chain_exchange.send_response(inner_channel, response)
        }
        if !self.events.is_empty() {
            return Poll::Ready(NetworkBehaviourAction::GenerateEvent(self.events.remove(0)));
        }
        Poll::Pending
    }
/// Consumes the events list when polled.
Consumes the events list when polled.
Consumes the events list when polled .
fn poll<TBehaviourIn>(
        &mut self,
        cx: &mut Context,
        _: &mut impl PollParameters,
    ) -> Poll<NetworkBehaviourAction<TBehaviourIn, ForestBehaviourEvent>> {
        // Poll to see if any response is ready to be sent back.
        while let Poll::Ready(Some(outcome)) = self.cx_pending_responses.poll_next_unpin(cx) {
            let RequestProcessingOutcome {
                inner_channel,
                response,
            } = match outcome {
                Some(outcome) => outcome,
                // The response builder was too busy and thus the request was dropped. This is
                // later on reported as a `InboundFailure::Omission`.
                None => continue,
            };
            self.chain_exchange.send_response(inner_channel, response)
        }
        if !self.events.is_empty() {
            return Poll::Ready(NetworkBehaviourAction::GenerateEvent(self.events.remove(0)));
        }
        Poll::Pending
    }
fn poll < TBehaviourIn > ( & mut self , cx : & mut Context , _ : & mut impl PollParameters , ) -> Poll < NetworkBehaviourAction < TBehaviourIn , ForestBehaviourEvent > > { // Poll to see if any response is ready to be sent back. while let Poll :: Ready ( Some ( outcome ) ) = self . cx_pending_responses . poll_next_unpin ( cx ) { let RequestProcessingOutcome { inner_channel , response , } = match outcome { Some ( outcome ) => outcome , // The response builder was too busy and thus the request was dropped. This is // later on reported as a `InboundFailure::Omission`. None => continue , } ; self . chain_exchange . send_response ( inner_channel , response ) } if ! self . events . is_empty ( ) { return Poll :: Ready ( NetworkBehaviourAction :: GenerateEvent ( self . events . remove ( 0 ) ) ) ; } Poll :: Pending }
Consumes the events list when polled.
Consumes the events list when polled .
&mut self
cx
&mut impl PollParameters