pub trait RecvStream {
type Buf: Buf;
// Required methods
fn poll_data(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Option<Self::Buf>, StreamErrorIncoming>>;
fn stop_sending(&mut self, error_code: u64);
fn recv_id(&self) -> StreamId;
}Expand description
A trait describing the “receive” actions of a QUIC stream.
Required Associated Types§
Required Methods§
Sourcefn poll_data( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Option<Self::Buf>, StreamErrorIncoming>>
fn poll_data( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Option<Self::Buf>, StreamErrorIncoming>>
Poll the stream for more data.
When the receiving side will no longer receive more data (such as because the peer closed their sending side), this should return None.
Sourcefn stop_sending(&mut self, error_code: u64)
fn stop_sending(&mut self, error_code: u64)
Send a STOP_SENDING QUIC code.