SendStream

Trait SendStream 

Source
pub trait SendStream<B: Buf> {
    // Required methods
    fn poll_ready(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<(), StreamErrorIncoming>>;
    fn send_data<T: Into<WriteBuf<B>>>(
        &mut self,
        data: T,
    ) -> Result<(), StreamErrorIncoming>;
    fn poll_finish(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<(), StreamErrorIncoming>>;
    fn reset(&mut self, reset_code: u64);
    fn send_id(&self) -> StreamId;
}
Expand description

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

Required Methods§

Source

fn poll_ready( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), StreamErrorIncoming>>

Polls if the stream can send more data.

Source

fn send_data<T: Into<WriteBuf<B>>>( &mut self, data: T, ) -> Result<(), StreamErrorIncoming>

Send more data on the stream.

Source

fn poll_finish( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), StreamErrorIncoming>>

Poll to finish the sending side of the stream.

Source

fn reset(&mut self, reset_code: u64)

Send a QUIC reset code.

Source

fn send_id(&self) -> StreamId

Get QUIC send stream id

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§