pub fn stop(&mut self, id: StreamId, error_code: VarInt) -> Result<(), UnknownStream> {
        assert!(
            id.dir() == Dir::Bi || id.initiator() != self.side,
            "only streams supporting incoming data may be stopped"
        );
        // Only bother if there's data we haven't received yet
        if self.streams.stop(id)? {
            let space = &mut self.spaces[SpaceId::Data];
            space
                .pending
                .stop_sending
                .push(frame::StopSending { id, error_code });
        }
        Ok(())
    }
/// Stop accepting data on the given receive stream
///
/// Discards unread data and notifies the peer to stop transmitting. Once stopped, a stream
/// cannot be read from any further.
Stop accepting data on the given receive stream
Discards unread data and notifies the peer to stop transmitting. Once stopped, a stream
cannot be read from any further.
Stop accepting data on the given receive stream Discards unread data and notifies the peer to stop transmitting . Once stopped a stream cannot be read from any further .
pub fn stop(&mut self, id: StreamId, error_code: VarInt) -> Result<(), UnknownStream> {
        assert!(
            id.dir() == Dir::Bi || id.initiator() != self.side,
            "only streams supporting incoming data may be stopped"
        );
        // Only bother if there's data we haven't received yet
        if self.streams.stop(id)? {
            let space = &mut self.spaces[SpaceId::Data];
            space
                .pending
                .stop_sending
                .push(frame::StopSending { id, error_code });
        }
        Ok(())
    }
pub fn stop ( & mut self , id : StreamId , error_code : VarInt ) -> Result < ( ) , UnknownStream > { assert ! ( id dir ( ) Dir Bi id initiator ( ) self side " " ) ; // Only bother if there's data we haven't received yet if self . streams . stop ( id ) ? { let space = & mut self . spaces [ SpaceId :: Data ] ; space . pending . stop_sending . push ( frame :: StopSending { id , error_code } ) ; } Ok ( ( ) ) }
Stop accepting data on the given receive stream
Discards unread data and notifies the peer to stop transmitting.
Stop accepting data on the given receive stream Discards unread data and notifies the peer to stop transmitting .
&mut self
id
StreamId
error_code
VarInt