Struct HttpPooledConnectorConfig
pub struct HttpPooledConnectorConfig {
pub max_total: usize,
pub max_active: usize,
pub idle_timeout: Option<Duration>,
pub wait_for_pool_timeout: Option<Duration>,
}
Expand description
Config used to create the default http connection pool
Fields§
§max_total: usize
Set the max amount of connections that this connection pool will contain
This is the sum of active connections and idle connections. When this limit is hit idle connections will be replaced with new ones.
max_active: usize
Set the max amount of connections that can actively be used
Requesting a connection from the pool will block until the pool is below max capacity again.
idle_timeout: Option<Duration>
If connections have been idle for longer then the provided timeout they will be dropped and removed from the pool
Note: timeout is only checked when a connection is requested from the pool, it is not something that is done periodically
wait_for_pool_timeout: Option<Duration>
When a pool is operating at max active capacity wait for this duration to get a connection from the pool before the connector raises a timeout error
Implementations§
§impl HttpPooledConnectorConfig
impl HttpPooledConnectorConfig
pub fn build_connector<C, S>( self, inner: S, ) -> Result<PooledConnector<S, LruDropPool<C, (Protocol, Authority)>, BasicHttpConnIdentifier>, OpaqueError>
Trait Implementations§
§impl Clone for HttpPooledConnectorConfig
impl Clone for HttpPooledConnectorConfig
§fn clone(&self) -> HttpPooledConnectorConfig
fn clone(&self) -> HttpPooledConnectorConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Default for HttpPooledConnectorConfig
impl Default for HttpPooledConnectorConfig
§fn default() -> HttpPooledConnectorConfig
fn default() -> HttpPooledConnectorConfig
Auto Trait Implementations§
impl Freeze for HttpPooledConnectorConfig
impl RefUnwindSafe for HttpPooledConnectorConfig
impl Send for HttpPooledConnectorConfig
impl Sync for HttpPooledConnectorConfig
impl Unpin for HttpPooledConnectorConfig
impl UnwindSafe for HttpPooledConnectorConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more