pub struct ConnectionPool { /* private fields */ }Expand description
Connection pool for managing MCP server connections
Implementations§
Source§impl ConnectionPool
impl ConnectionPool
Sourcepub fn with_config(config: PoolConfig) -> Self
pub fn with_config(config: PoolConfig) -> Self
Creates a new connection pool with custom configuration
Sourcepub async fn acquire(&self, server_id: &str) -> Result<PooledConnection>
pub async fn acquire(&self, server_id: &str) -> Result<PooledConnection>
Sourcepub async fn release(&self, connection: PooledConnection) -> Result<()>
pub async fn release(&self, connection: PooledConnection) -> Result<()>
Sourcepub async fn validate(&self, connection: &PooledConnection) -> bool
pub async fn validate(&self, connection: &PooledConnection) -> bool
Sourcepub async fn health_check(&self) -> usize
pub async fn health_check(&self) -> usize
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 moreSource§impl Debug for ConnectionPool
impl Debug for ConnectionPool
Auto Trait Implementations§
impl Freeze for ConnectionPool
impl !RefUnwindSafe for ConnectionPool
impl Send for ConnectionPool
impl Sync for ConnectionPool
impl Unpin 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