/// Run the Hfp object to completion. Runs until an unrecoverable error occurs or there is no
/// more work to perform because all managed resource have been closed.
Run the Hfp object to completion. Runs until an unrecoverable error occurs or there is no
more work to perform because all managed resource have been closed.
Run the Hfp object to completion . Runs until an unrecoverable error occurs or there is no more work to perform because all managed resource have been closed .
pub async fn run(mut self) -> Result<(), Error> {
        loop {
            select! {
                // If the profile stream ever terminates, the component should shut down.
                event = self.profile_client.next() => {
                    if let Some(event) = event {
                        self.handle_profile_event(event?).await?;
                    } else {
                        break;
                    }
                }
                manager = self.call_manager_registration.select_next_some() => {
                    self.handle_new_call_manager(manager).await?;
                }
                request = self.test_requests.select_next_some() => {
                    self.handle_test_request(request).await?;
                }
                removed = self.peers.next() => {
                    let _ = removed.map(|id| debug!("Peer removed: {}", id));
                }
                event = self.internal_events_rx.select_next_some() => {
                    self.handle_internal_event(event).await;
                }
                complete => {
                    break;
                }
            }
        }
        Ok(())
    }
pub async fn run ( mut self ) -> Result < ( ) , Error > { loop { select ! { // If the profile stream ever terminates, the component should shut down. event self profile_client next ( ) { if let Some ( event ) event { self handle_profile_event ( event ) await } else { break } } manager self call_manager_registration select_next_some ( ) { self handle_new_call_manager ( manager ) await } request self test_requests select_next_some ( ) { self handle_test_request ( request ) await } removed self peers next ( ) { let removed map ( id debug ( " " id ) ) } event self internal_events_rx select_next_some ( ) { self handle_internal_event ( event ) await } complete { break } } } Ok ( ( ) ) }
Run the Hfp object to completion.
Run the Hfp object to completion .
mut self