Skip to main content

SendStream

Trait SendStream 

Source
pub trait SendStream<B: Buf> {
    type Error: Into<Box<dyn Error>>;

    // Required methods
    fn poll_ready(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<(), Self::Error>>;
    fn send_data<T: Into<WriteBuf<B>>>(
        &mut self,
        data: T,
    ) -> Result<(), Self::Error>;
    fn poll_finish(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<(), Self::Error>>;
    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 Associated Types§

Source

type Error: Into<Box<dyn Error>>

The error type returned by fallible send methods.

Required Methods§

Source

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

Polls if the stream can send more data.

Source

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

Send more data on the stream.

Source

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

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".

Implementors§

Source§

impl<B> SendStream<B> for sec_http3::sec_http3_quinn::BidiStream<B>
where B: Buf,

Source§

impl<B> SendStream<B> for sec_http3::sec_http3_quinn::SendStream<B>
where B: Buf,

Source§

impl<S, B> SendStream<B> for sec_http3::webtransport::stream::BidiStream<S, B>
where S: SendStream<B>, B: Buf,

Source§

type Error = <S as SendStream<B>>::Error

Source§

impl<S, B> SendStream<B> for sec_http3::webtransport::stream::SendStream<S, B>
where S: SendStream<B>, B: Buf,

Source§

type Error = <S as SendStream<B>>::Error