pub struct ConnectionPool { /* private fields */ }Expand description
Shared connection topology and pooling policy.
Construct a pool with ConnectionPool::builder, then create Client
handles for its anonymous or explicit partitions. The pool itself owns no
request placement; each client supplies that partition choice. Cloning a
pool or client shares all retained connections and admission state.
A pool built with explicit partitions does not also create an anonymous partition. Dropping the final shared owner logically closes retained connections and stops partition maintenance.
Implementations§
Source§impl ConnectionPool
impl ConnectionPool
Sourcepub fn origin_stats(&self, origin: &OriginKey) -> OriginConnectionStats
pub fn origin_stats(&self, origin: &OriginKey) -> OriginConnectionStats
Returns current bounded-capacity accounting for one canonical origin.
The capacity limit applies across every partition. Capacity in use includes establishments, open connections, and detached HTTP/1 upgrades that still own root transport I/O. Ordinary draining connections are excluded after returning their capacity.
Unbounded origins return statistics without a capacity value. The query does not create admission state for an unused origin.
Sourcepub fn partition_stats(
&self,
partition: PartitionId,
origin: &OriginKey,
) -> Option<PartitionConnectionStats>
pub fn partition_stats( &self, partition: PartitionId, origin: &OriginKey, ) -> Option<PartitionConnectionStats>
Returns a diagnostic connection snapshot for one partition and origin.
An unknown partition returns None. A configured partition without a
retained cell for origin returns zeroed statistics. Cell-owned values
are read under the existing cell lock. Counts for lifetimes that can
outlive cell records use relaxed atomics and converge after concurrent
transitions settle.
Trait Implementations§
Source§impl Clone for ConnectionPool
impl Clone for ConnectionPool
Source§fn clone(&self) -> ConnectionPool
fn clone(&self) -> ConnectionPool
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ConnectionPool
impl !UnwindSafe for ConnectionPool
impl Freeze for ConnectionPool
impl Send for ConnectionPool
impl Sync for ConnectionPool
impl Unpin for ConnectionPool
impl UnsafeUnpin for ConnectionPool
Blanket Implementations§
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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