/// Get the next input frame.
Get the next input frame.
Get the next input frame .
pub async fn next(&mut self) -> Result<Option<Frame<'_>>> {
        let headers = match Headers::read(&mut self.buf, &mut self.stdin).await? {
            Some(headers) => headers,
            None => return Ok(None),
        };
        log::trace!("headers: {:?}", headers);
        let length = match headers.content_length {
            Some(length) => length as usize,
            None => bail!("missing content-length"),
        };
        self.buf.resize(length, 0u8);
        log::trace!("read frame: {}", self.buf.len());
        self.stdin.read_exact(&mut self.buf[..]).await?;
        Ok(Some(Frame { content: &self.buf }))
    }
pub async fn next ( & mut self ) -> Result < Option < Frame < ' _ > > > { let headers = match Headers :: read ( & mut self . buf , & mut self . stdin ) . await ? { Some ( headers ) => headers , None => return Ok ( None ) , } ; log :: trace ! ( " " headers ) ; let length = match headers . content_length { Some ( length ) => length as usize , None => bail ! ( " " ) , } ; self . buf . resize ( length , 0u8 ) ; log :: trace ! ( " " self buf len ( ) ) ; self . stdin . read_exact ( & mut self . buf [ .. ] ) . await ? ; Ok ( Some ( Frame { content : & self . buf } ) ) }
Get the next input frame.
Get the next input frame .
&mut self