CloseStream

Trait CloseStream 

pub trait CloseStream: ConnectionState {
    // Provided methods
    fn handle_connection_error_on_stream(
        &mut self,
        internal_error: InternalConnectionError,
    ) -> StreamError { ... }
    fn handle_quic_stream_error(
        &self,
        error: StreamErrorIncoming,
    ) -> StreamError { ... }
    fn check_peer_connection_closing(&self) -> Option<StreamError> { ... }
}
Available on crate features quic and h3 and i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Expand description

This trait is implemented for all types which can close a stream

Provided Methods§

fn handle_connection_error_on_stream( &mut self, internal_error: InternalConnectionError, ) -> StreamError

Handles a connection error on a stream

fn handle_quic_stream_error(&self, error: StreamErrorIncoming) -> StreamError

Handles a incoming stream error from the quic layer

fn check_peer_connection_closing(&self) -> Option<StreamError>

Checks if the peer connection is closing an if it is allowed to send a request / server push

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.

Implementations on Foreign Types§

§

impl<H> CloseStream for DatagramReader<H>
where H: RecvDatagram,

Implementors§

§

impl<C, B> CloseStream for RequestResolver<C, B>
where C: Connection<B>, B: Buf,

§

impl<S, B> CloseStream for compio::quic::h3::client::RequestStream<S, B>

§

impl<S, B> CloseStream for compio::quic::h3::connection::RequestStream<S, B>

§

impl<S, B> CloseStream for compio::quic::h3::server::RequestStream<S, B>

§

impl<T, B> CloseStream for SendRequest<T, B>
where T: OpenStreams<B>, B: Buf,