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 feature
h3 only.Expand description
This trait is implemented for all types which can close a stream
Provided Methods§
Sourcefn handle_connection_error_on_stream(
&mut self,
internal_error: InternalConnectionError,
) -> StreamError
fn handle_connection_error_on_stream( &mut self, internal_error: InternalConnectionError, ) -> StreamError
Handles a connection error on a stream
Sourcefn handle_quic_stream_error(&self, error: StreamErrorIncoming) -> StreamError
fn handle_quic_stream_error(&self, error: StreamErrorIncoming) -> StreamError
Handles a incoming stream error from the quic layer
Sourcefn check_peer_connection_closing(&self) -> Option<StreamError>
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.