pub async fn handle_stream(&self, mut stream: SetUiServiceRequestStream) -> Result<(), Error> {
        // A single StreamSetting watcher is created for the lifetime of the stream.
        // It is used for asynchronously processing updates to a setting type and
        // tracking the current values.

        while let Some(req) = await!(stream.try_next())? {
            match req {
                SetUiServiceRequest::Mutate { setting_type, mutation, responder } => {
                    let mut response = self.mutate(setting_type, mutation);
                    responder.send(&mut response)?;
                }
                SetUiServiceRequest::Watch { setting_type, responder } => {
                    self.watch(setting_type, responder);
                }
                _ => {}
            }
        }

        Ok(())
    }
/// Asynchronous handling of the given stream. Note that we must consider the
/// possibility of simultaneous active streams.
Asynchronous handling of the given stream. Note that we must consider the
possibility of simultaneous active streams.
Asynchronous handling of the given stream . Note that we must consider the possibility of simultaneous active streams .
pub async fn handle_stream(&self, mut stream: SetUiServiceRequestStream) -> Result<(), Error> {
        // A single StreamSetting watcher is created for the lifetime of the stream.
        // It is used for asynchronously processing updates to a setting type and
        // tracking the current values.
        while let Some(req) = await!(stream.try_next())? {
            match req {
                SetUiServiceRequest::Mutate { setting_type, mutation, responder } => {
                    let mut response = self.mutate(setting_type, mutation);
                    responder.send(&mut response)?;
                }
                SetUiServiceRequest::Watch { setting_type, responder } => {
                    self.watch(setting_type, responder);
                }
                _ => {}
            }
        }
        Ok(())
    }
pub async fn handle_stream ( & self , mut stream : SetUiServiceRequestStream ) -> Result < ( ) , Error > { // A single StreamSetting watcher is created for the lifetime of the stream. // It is used for asynchronously processing updates to a setting type and // tracking the current values. while let Some ( req ) = await ! ( stream try_next ( ) ) ? { match req { SetUiServiceRequest :: Mutate { setting_type , mutation , responder } => { let mut response = self . mutate ( setting_type , mutation ) ; responder . send ( & mut response ) ? ; } SetUiServiceRequest :: Watch { setting_type , responder } => { self . watch ( setting_type , responder ) ; } _ => { } } } Ok ( ( ) ) }
Asynchronous handling of the given stream.
Asynchronous handling of the given stream .
&self
stream
SetUiServiceRequestStream
&self
stream
SetUiServiceRequestStream