pub trait HttpConnectionPool {
type Identity: Identity;
type Certificate: Certificate;
type ConnectionDispather: HttpConnectionDispatcher;
type ConnectionCache;
// Required methods
fn new(max_idle_connections: u32, keep_alive_duration: Duration) -> Self;
fn connections(&self) -> &Self::ConnectionCache;
fn connection_count(&self) -> u32;
fn create_connection<D>(
&mut self,
config: &ConnectionConfig<'_, Self::Identity, Self::Certificate>,
dns_resolver: &D,
) -> impl Future<Output = Result<&mut Self::ConnectionDispather>>
where D: DnsResolver;
}Expand description
Trait that represents the HTTP connection pool.
Required Associated Types§
Sourcetype Certificate: Certificate
type Certificate: Certificate
The certificate type.
Sourcetype ConnectionDispather: HttpConnectionDispatcher
type ConnectionDispather: HttpConnectionDispatcher
The connection dispatcher type.
Sourcetype ConnectionCache
type ConnectionCache
The connection cache type.
Required Methods§
Sourcefn connections(&self) -> &Self::ConnectionCache
fn connections(&self) -> &Self::ConnectionCache
Sourcefn connection_count(&self) -> u32
fn connection_count(&self) -> u32
Sourcefn create_connection<D>(
&mut self,
config: &ConnectionConfig<'_, Self::Identity, Self::Certificate>,
dns_resolver: &D,
) -> impl Future<Output = Result<&mut Self::ConnectionDispather>>where
D: DnsResolver,
fn create_connection<D>(
&mut self,
config: &ConnectionConfig<'_, Self::Identity, Self::Certificate>,
dns_resolver: &D,
) -> impl Future<Output = Result<&mut Self::ConnectionDispather>>where
D: DnsResolver,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".