pub fn read_data(
        &mut self,
        conn: &mut Connection,
        stream_id: StreamId,
        buf: &mut [u8],
    ) -> Res<(usize, bool)> {
        qinfo!([self], "read_data from stream {}.", stream_id);
        let res = self
            .recv_streams
            .get_mut(&stream_id)
            .ok_or(Error::InvalidStreamId)?
            .read_data(conn, buf);
        self.handle_stream_manipulation_output(res, stream_id, conn)
    }
/// Stream data are read directly into a buffer supplied as a parameter of this function to avoid copying
/// data.
/// # Errors
/// It returns an error if a stream does not exist or an error happens while reading a stream, e.g.
/// early close, protocol error, etc.
Stream data are read directly into a buffer supplied as a parameter of this function to avoid copying
data.
Stream data are read directly into a buffer supplied as a parameter of this function to avoid copying data .
pub fn read_data(
        &mut self,
        conn: &mut Connection,
        stream_id: StreamId,
        buf: &mut [u8],
    ) -> Res<(usize, bool)> {
        qinfo!([self], "read_data from stream {}.", stream_id);
        let res = self
            .recv_streams
            .get_mut(&stream_id)
            .ok_or(Error::InvalidStreamId)?
            .read_data(conn, buf);
        self.handle_stream_manipulation_output(res, stream_id, conn)
    }
pub fn read_data ( & mut self , conn : & mut Connection , stream_id : StreamId , buf : & mut [ u8 ] , ) -> Res < ( usize , bool ) > { qinfo ! ( [ self ] " " stream_id ) ; let res = self . recv_streams . get_mut ( & stream_id ) . ok_or ( Error :: InvalidStreamId ) ? . read_data ( conn , buf ) ; self . handle_stream_manipulation_output ( res , stream_id , conn ) }
Stream data are read directly into a buffer supplied as a parameter of this function to avoid copying
data.
Stream data are read directly into a buffer supplied as a parameter of this function to avoid copying data .
&mut self
conn
&mut Connection
stream_id
StreamId
buf
&mut [u8]
errors
It returns an error if a stream does not exist or an error happens while reading a stream, e.g.
early close, protocol error, etc.
It returns an error if a stream does not exist or an error happens while reading a stream e . g . early close protocol error etc .