pub async fn handle_requests_for_stream(
        &self,
        account_stream: AccountRequestStream,
        mut cancel: TaskGroupCancel,
    ) {
        let mut account_stream = account_stream.fuse();
        loop {
            select! {
                res = account_stream.try_next() => match res {
                    Ok(Some(request)) => {
                        self.handle_request(request)
                            .unwrap_or_else(|err| {
                                error!("error handling FIDL request: {:#}", err)
                            })
                            .await;
                    }
                    Ok(None) => {
                        break;
                    }
                    Err(err) => {
                        error!("error reading FIDL request from stream: {:#}", err);
                        break;
                    }
                },
                _ = &mut cancel => {
                    warn!("Account FIDL server canceled");
                    break;
                }
            }
        }
    }
/// Serially process a stream of incoming Account FIDL requests, shutting down the channel when
/// `cancel` is signaled.
Serially process a stream of incoming Account FIDL requests, shutting down the channel when
`cancel` is signaled.
Serially process a stream of incoming Account FIDL requests shutting down the channel when ` cancel ` is signaled .
pub async fn handle_requests_for_stream(
        &self,
        account_stream: AccountRequestStream,
        mut cancel: TaskGroupCancel,
    ) {
        let mut account_stream = account_stream.fuse();
        loop {
            select! {
                res = account_stream.try_next() => match res {
                    Ok(Some(request)) => {
                        self.handle_request(request)
                            .unwrap_or_else(|err| {
                                error!("error handling FIDL request: {:#}", err)
                            })
                            .await;
                    }
                    Ok(None) => {
                        break;
                    }
                    Err(err) => {
                        error!("error reading FIDL request from stream: {:#}", err);
                        break;
                    }
                },
                _ = &mut cancel => {
                    warn!("Account FIDL server canceled");
                    break;
                }
            }
        }
    }
pub async fn handle_requests_for_stream ( & self , account_stream : AccountRequestStream , mut cancel : TaskGroupCancel , ) { let mut account_stream = account_stream . fuse ( ) ; loop { select ! { res account_stream try_next ( ) match res { Ok ( Some ( request ) ) { self handle_request ( request ) unwrap_or_else ( err { error ( " " err ) } ) await } Ok ( None ) { break } Err ( err ) { error ( " " err ) break } } mut cancel { warn ( " " ) break } } } }
Serially process a stream of incoming Account FIDL requests, shutting down the channel when
`cancel` is signaled.
Serially process a stream of incoming Account FIDL requests shutting down the channel when ` cancel ` is signaled .
&self
account_stream
AccountRequestStream
cancel
TaskGroupCancel
&self
account_stream
AccountRequestStream
cancel
TaskGroupCancel