Trait salvo_core::proto::quic::SendStream

source ·
pub trait SendStream<B>
where 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>(&mut self, data: T) -> Result<(), Self::Error> where T: Into<WriteBuf<B>>; fn poll_finish( &mut self, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>; fn reset(&mut self, reset_code: u64); fn send_id(&self) -> StreamId; }
Available on crate feature quinn only.
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>(&mut self, data: T) -> Result<(), Self::Error>
where T: Into<WriteBuf<B>>,

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<B> SendStream<B> for salvo_http3::http3_quinn::BidiStream<B>
where B: Buf,

source§

impl<B> SendStream<B> for salvo_http3::http3_quinn::SendStream<B>
where B: Buf,

source§

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

§

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

source§

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

§

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

source§

impl<S, B> SendStream<B> for BufRecvStream<S, B>
where B: Buf, S: SendStream<B>,

§

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

source§

impl<T, B> SendStream<B> for FrameStream<T, B>
where T: SendStream<B>, B: Buf,

§

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