pub fn stop(&mut self, id: StreamId) -> Result<StopResult, UnknownStream> {
        let stream = match self.recv.get_mut(&id) {
            Some(s) => s,
            None => return Err(UnknownStream { _private: () }),
        };
        if stream.assembler.is_stopped() {
            return Err(UnknownStream { _private: () });
        }
        stream.assembler.stop();
        let stop_sending = ShouldTransmit(!stream.is_finished());

        // Issue flow control credit for unread data
        let read_credits = stream.assembler.end() - stream.assembler.bytes_read();
        let max_data = self.add_read_credits(read_credits);
        Ok(StopResult {
            stop_sending,
            max_data,
        })
    }
/// Cease accepting data on a stream
///
/// Returns a structure which indicates whether this action
/// requires transmitting any frames.
Cease accepting data on a stream
Returns a structure which indicates whether this action
requires transmitting any frames.
Cease accepting data on a stream Returns a structure which indicates whether this action requires transmitting any frames .
pub fn stop(&mut self, id: StreamId) -> Result<StopResult, UnknownStream> {
        let stream = match self.recv.get_mut(&id) {
            Some(s) => s,
            None => return Err(UnknownStream { _private: () }),
        };
        if stream.assembler.is_stopped() {
            return Err(UnknownStream { _private: () });
        }
        stream.assembler.stop();
        let stop_sending = ShouldTransmit(!stream.is_finished());
        // Issue flow control credit for unread data
        let read_credits = stream.assembler.end() - stream.assembler.bytes_read();
        let max_data = self.add_read_credits(read_credits);
        Ok(StopResult {
            stop_sending,
            max_data,
        })
    }
pub fn stop ( & mut self , id : StreamId ) -> Result < StopResult , UnknownStream > { let stream = match self . recv . get_mut ( & id ) { Some ( s ) => s , None => return Err ( UnknownStream { _private : ( ) } ) , } ; if stream . assembler . is_stopped ( ) { return Err ( UnknownStream { _private : ( ) } ) ; } stream . assembler . stop ( ) ; let stop_sending = ShouldTransmit ( ! stream . is_finished ( ) ) ; // Issue flow control credit for unread data let read_credits = stream . assembler . end ( ) - stream . assembler . bytes_read ( ) ; let max_data = self . add_read_credits ( read_credits ) ; Ok ( StopResult { stop_sending , max_data , } ) }
Cease accepting data on a stream
Returns a structure which indicates whether this action
requires transmitting any frames.
Cease accepting data on a stream Returns a structure which indicates whether this action requires transmitting any frames .
&mut self
id
StreamId