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§
Required Methods§
Sourcefn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Polls if the stream can send more data.
Sourcefn send_data<T: Into<WriteBuf<B>>>(
&mut self,
data: T,
) -> Result<(), Self::Error>
fn send_data<T: Into<WriteBuf<B>>>( &mut self, data: T, ) -> Result<(), Self::Error>
Send more data on the stream.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".