/// Handle a stream of ModuleOutputWriter requests.
Handle a stream of ModuleOutputWriter requests.
Handle a stream of ModuleOutputWriter requests .
pub fn spawn(self, mut stream: ModuleOutputWriterRequestStream) {
        fasync::spawn(
            async move {
                while let Some(request) = await!(stream.try_next()).context(format!(
                    "Error running module output for {:?} {:?}",
                    self.story_id, self.module_id,
                ))? {
                    match request {
                        ModuleOutputWriterRequest::Write {
                            output_name,
                            entity_reference,
                            responder,
                        } => {
                            self.handle_write(output_name, entity_reference);
                            responder.send(&mut Ok(()))?;
                        }
                    }
                }
                Ok(())
            }
                .unwrap_or_else(|e: Error| fx_log_err!("error serving module output {}", e)),
        )
    }
pub fn spawn ( self , mut stream : ModuleOutputWriterRequestStream ) { fasync :: spawn ( async move { while let Some ( request ) = await ! ( stream try_next ( ) ) . context ( format ! ( " " self story_id self module_id ) ) ? { match request { ModuleOutputWriterRequest :: Write { output_name , entity_reference , responder , } => { self . handle_write ( output_name , entity_reference ) ; responder . send ( & mut Ok ( ( ) ) ) ? ; } } } Ok ( ( ) ) } . unwrap_or_else ( | e : Error | fx_log_err ! ( " " e ) ) , ) }
Handle a stream of ModuleOutputWriter requests.
Handle a stream of ModuleOutputWriter requests .
self
stream
ModuleOutputWriterRequestStream