Trait RecvStream

Source
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;
}
Available on crate feature h3 only.
Expand description

A trait describing the “receive” actions of a QUIC stream.

Required Associated Types§

Source

type Buf: Buf

The type of Buf for data received on this stream.

Required Methods§

Source

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.

Source

fn stop_sending(&mut self, error_code: u64)

Send a STOP_SENDING QUIC code.

Source

fn recv_id(&self) -> StreamId

Get QUIC send stream id

Implementors§