pub struct H2ConnectionPool { /* private fields */ }Expand description
Bounded H2 connection pool with idle timeout and GOAWAY-aware retirement.
Implementations§
Source§impl H2ConnectionPool
impl H2ConnectionPool
pub fn new( pool_size: u32, idle_timeout: Duration, max_concurrent_streams: u32, ) -> Arc<Self> ⓘ
Sourcepub fn release(&self, entry: &Arc<H2ConnectionEntry>)
pub fn release(&self, entry: &Arc<H2ConnectionEntry>)
Release a connection back to the pool after a stream completes.
Sourcepub fn retire(&self, entry: &Arc<H2ConnectionEntry>)
pub fn retire(&self, entry: &Arc<H2ConnectionEntry>)
Mark a connection as retired (e.g., on GOAWAY).
Sourcepub fn stats(&self) -> H2PoolStats
pub fn stats(&self) -> H2PoolStats
Get pool statistics.
Trait Implementations§
Source§impl Drop for H2ConnectionPool
impl Drop for H2ConnectionPool
Auto Trait Implementations§
impl !Freeze for H2ConnectionPool
impl RefUnwindSafe for H2ConnectionPool
impl Send for H2ConnectionPool
impl Sync for H2ConnectionPool
impl Unpin for H2ConnectionPool
impl UnsafeUnpin for H2ConnectionPool
impl UnwindSafe for H2ConnectionPool
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
Mutably borrows from an owned value. Read more