fn handle_stream_manipulation_output<U>(
        &mut self,
        output: Res<(U, bool)>,
        stream_id: StreamId,
        conn: &mut Connection,
    ) -> Res<(U, bool)>
    where
        U: Default,
    {
        match &output {
            Ok((_, true)) => {
                self.remove_recv_stream(stream_id, conn);
            }
            Ok((_, false)) => {}
            Err(e) => {
                if e.stream_reset_error() && !self.recv_stream_is_critical(stream_id) {
                    mem::drop(conn.stream_stop_sending(stream_id, e.code()));
                    self.close_recv(stream_id, CloseType::LocalError(e.code()), conn)?;
                    return Ok((U::default(), false));
                }
            }
        }
        output
    }
/// This function will not handle the output of the function completely, but only
/// handle the indication that a stream is closed. There are 2 cases:
///  - an error occurred or
///  - the stream is done, i.e. the second value in `output` tuple is true if
///    the stream is done and can be removed from the `recv_streams`
/// How it is handling `output`:
///  - if the stream is done, it removes the stream from `recv_streams`
///  - if the stream is not done and there is no error, return `output` and the caller will
///    handle it.
///  - in case of an error:
///    - if it is only a stream error and the stream is not critical, send `STOP_SENDING`
///      frame, remove the stream from `recv_streams` and inform the listener that the stream
///      has been reset.
///    - otherwise this is a connection error. In this case, propagate the error to the caller
///      that will handle it properly.
This function will not handle the output of the function completely, but only
handle the indication that a stream is closed. There are 2 cases:
an error occurred or
the stream is done, i.e.
This function will not handle the output of the function completely but only handle the indication that a stream is closed . There are 2 cases : an error occurred or the stream is done i . e .
fn handle_stream_manipulation_output<U>(
        &mut self,
        output: Res<(U, bool)>,
        stream_id: StreamId,
        conn: &mut Connection,
    ) -> Res<(U, bool)>
    where
        U: Default,
    {
        match &output {
            Ok((_, true)) => {
                self.remove_recv_stream(stream_id, conn);
            }
            Ok((_, false)) => {}
            Err(e) => {
                if e.stream_reset_error() && !self.recv_stream_is_critical(stream_id) {
                    mem::drop(conn.stream_stop_sending(stream_id, e.code()));
                    self.close_recv(stream_id, CloseType::LocalError(e.code()), conn)?;
                    return Ok((U::default(), false));
                }
            }
        }
        output
    }
fn handle_stream_manipulation_output < U > ( & mut self , output : Res < ( U , bool ) > , stream_id : StreamId , conn : & mut Connection , ) -> Res < ( U , bool ) > where U : Default , { match & output { Ok ( ( _ , true ) ) => { self . remove_recv_stream ( stream_id , conn ) ; } Ok ( ( _ , false ) ) => { } Err ( e ) => { if e . stream_reset_error ( ) && ! self . recv_stream_is_critical ( stream_id ) { mem :: drop ( conn . stream_stop_sending ( stream_id , e . code ( ) ) ) ; self . close_recv ( stream_id , CloseType :: LocalError ( e . code ( ) ) , conn ) ? ; return Ok ( ( U :: default ( ) , false ) ) ; } } } output }
This function will not handle the output of the function completely, but only
handle the indication that a stream is closed.
This function will not handle the output of the function completely but only handle the indication that a stream is closed .
&mut self
output
Res<(U, bool)>
stream_id
StreamId
conn
&mut Connection