pub struct ConnectionPool { /* private fields */ }Expand description
High-performance connection pool for IPC connections
Implementations§
Source§impl ConnectionPool
impl ConnectionPool
Sourcepub fn new(name: Name<'static>, config: PoolConfig) -> Self
pub fn new(name: Name<'static>, config: PoolConfig) -> Self
Create a new connection pool
Sourcepub fn with_default_config(name: Name<'static>) -> Self
pub fn with_default_config(name: Name<'static>) -> Self
Create a connection pool with default configuration
Sourcepub async fn get_connection(&self) -> Result<PooledConnection>
pub async fn get_connection(&self) -> Result<PooledConnection>
Get a connection from the pool
Sourcepub async fn get_fresh_connection(&self) -> Result<PooledConnection>
pub async fn get_fresh_connection(&self) -> Result<PooledConnection>
Get a fresh connection optimized for PUT requests
Sourcepub async fn preheat_for_puts(&self, count: usize)
pub async fn preheat_for_puts(&self, count: usize)
Preheat fresh connections for better PUT performance
Sourcepub async fn get_connections(
&self,
count: usize,
) -> Result<Vec<PooledConnection>>
pub async fn get_connections( &self, count: usize, ) -> Result<Vec<PooledConnection>>
Get multiple connections for concurrent operations
Trait Implementations§
Source§impl Clone for ConnectionPool
impl Clone for ConnectionPool
Source§fn clone(&self) -> ConnectionPool
fn clone(&self) -> ConnectionPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConnectionPool
impl !RefUnwindSafe for ConnectionPool
impl Send for ConnectionPool
impl Sync for ConnectionPool
impl Unpin for ConnectionPool
impl UnsafeUnpin for ConnectionPool
impl !UnwindSafe 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
Mutably borrows from an owned value. Read more