pub trait PoolConnection {
// Required methods
fn is_closed(&self) -> bool;
fn can_open_stream(&self) -> bool;
fn request(
&self,
init: RequestInit,
) -> LocalBoxFuture<'static, Result<Response, H2Error>>;
fn close(&self);
}Expand description
A connection a H2Pool can route over. Implemented for H2Connection;
tests supply their own.
Required Methods§
Sourcefn can_open_stream(&self) -> bool
fn can_open_stream(&self) -> bool
Whether a new request would stay within the peer’s advertised SETTINGS_MAX_CONCURRENT_STREAMS.
Sourcefn request(
&self,
init: RequestInit,
) -> LocalBoxFuture<'static, Result<Response, H2Error>>
fn request( &self, init: RequestInit, ) -> LocalBoxFuture<'static, Result<Response, H2Error>>
Issue a request on this connection.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".