pub fn handle_stream_readable(
        &mut self,
        conn: &mut Connection,
        stream_id: StreamId,
    ) -> Res<ReceiveOutput> {
        let mut output = self.stream_receive(conn, stream_id)?;

        if let ReceiveOutput::NewStream(stream_type) = output {
            output = self.handle_new_stream(conn, stream_type, stream_id)?;
        }

        #[allow(clippy::match_same_arms)] // clippy is being stupid here
        match output {
            ReceiveOutput::UnblockedStreams(unblocked_streams) => {
                self.handle_unblocked_streams(unblocked_streams, conn)?;
                Ok(ReceiveOutput::NoOutput)
            }
            ReceiveOutput::ControlFrames(mut control_frames) => {
                let mut rest = Vec::new();
                for cf in control_frames.drain(..) {
                    if let Some(not_handled) = self.handle_control_frame(cf)? {
                        rest.push(not_handled);
                    }
                }
                Ok(ReceiveOutput::ControlFrames(rest))
            }
            ReceiveOutput::NewStream(
                NewStreamType::Push(_) | NewStreamType::Http | NewStreamType::WebTransportStream(_),
            ) => Ok(output),
            ReceiveOutput::NewStream(_) => {
                unreachable!("NewStream should have been handled already")
            }
            _ => Ok(output),
        }
    }
/// This function handles reading from all streams, i.e. control, qpack, request/response
/// stream and unidi stream that are still do not have a type.
/// The function cannot handle:
/// 1) a Push stream (if an unknown unidi stream is decoded to be a push stream)
/// 2) frames `MaxPushId` or `Goaway` must be handled by `Http3Client`/`Server`.
/// The function returns `ReceiveOutput`.
This function handles reading from all streams, i.e. control, qpack, request/response
stream and unidi stream that are still do not have a type.
This function handles reading from all streams i . e . control qpack request / response stream and unidi stream that are still do not have a type .
pub fn handle_stream_readable(
        &mut self,
        conn: &mut Connection,
        stream_id: StreamId,
    ) -> Res<ReceiveOutput> {
        let mut output = self.stream_receive(conn, stream_id)?;
        if let ReceiveOutput::NewStream(stream_type) = output {
            output = self.handle_new_stream(conn, stream_type, stream_id)?;
        }
        #[allow(clippy::match_same_arms)] // clippy is being stupid here
        match output {
            ReceiveOutput::UnblockedStreams(unblocked_streams) => {
                self.handle_unblocked_streams(unblocked_streams, conn)?;
                Ok(ReceiveOutput::NoOutput)
            }
            ReceiveOutput::ControlFrames(mut control_frames) => {
                let mut rest = Vec::new();
                for cf in control_frames.drain(..) {
                    if let Some(not_handled) = self.handle_control_frame(cf)? {
                        rest.push(not_handled);
                    }
                }
                Ok(ReceiveOutput::ControlFrames(rest))
            }
            ReceiveOutput::NewStream(
                NewStreamType::Push(_) | NewStreamType::Http | NewStreamType::WebTransportStream(_),
            ) => Ok(output),
            ReceiveOutput::NewStream(_) => {
                unreachable!("NewStream should have been handled already")
            }
            _ => Ok(output),
        }
    }
pub fn handle_stream_readable ( & mut self , conn : & mut Connection , stream_id : StreamId , ) -> Res < ReceiveOutput > { let mut output = self . stream_receive ( conn , stream_id ) ? ; if let ReceiveOutput :: NewStream ( stream_type ) = output { output = self . handle_new_stream ( conn , stream_type , stream_id ) ? ; } # [ allow ( clippy match_same_arms ) ] // clippy is being stupid here match output { ReceiveOutput :: UnblockedStreams ( unblocked_streams ) => { self . handle_unblocked_streams ( unblocked_streams , conn ) ? ; Ok ( ReceiveOutput :: NoOutput ) } ReceiveOutput :: ControlFrames ( mut control_frames ) => { let mut rest = Vec :: new ( ) ; for cf in control_frames . drain ( .. ) { if let Some ( not_handled ) = self . handle_control_frame ( cf ) ? { rest . push ( not_handled ) ; } } Ok ( ReceiveOutput :: ControlFrames ( rest ) ) } ReceiveOutput :: NewStream ( NewStreamType :: Push ( _ ) | NewStreamType :: Http | NewStreamType :: WebTransportStream ( _ ) , ) => Ok ( output ) , ReceiveOutput :: NewStream ( _ ) => { unreachable ! ( " " ) } _ => Ok ( output ) , } }
This function handles reading from all streams, i.e.
This function handles reading from all streams i . e .
&mut self
conn
&mut Connection
stream_id
StreamId