SendStream

Trait SendStream 

Source
pub trait SendStream:
    AsyncWrite
    + Send
    + Unpin
    + 'static {
    type FinishError: Error + Send + Sync + 'static;

    // Required methods
    fn finish(
        &mut self,
    ) -> impl Future<Output = Result<(), Self::FinishError>> + Send;
    fn reset(&mut self, code: u32);
}
Expand description

Abstraction over a QUIC send stream.

Implementations must support async writing and graceful/abrupt shutdown.

Required Associated Types§

Source

type FinishError: Error + Send + Sync + 'static

Error type for finishing the stream.

Required Methods§

Source

fn finish( &mut self, ) -> impl Future<Output = Result<(), Self::FinishError>> + Send

Gracefully finishes the stream, signaling no more data will be sent.

Source

fn reset(&mut self, code: u32)

Abruptly resets the stream with an error code.

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§