pub struct ConnectionPool { /* private fields */ }Expand description
Connection pool for Electrum clients.
Implementations§
Source§impl ConnectionPool
impl ConnectionPool
Sourcepub fn new(client_config: ClientConfig, pool_config: PoolConfig) -> Self
pub fn new(client_config: ClientConfig, pool_config: PoolConfig) -> Self
Create a new connection pool.
Sourcepub fn with_defaults(client_config: ClientConfig) -> Self
pub fn with_defaults(client_config: ClientConfig) -> Self
Create a pool with default configuration.
Sourcepub async fn initialize(&self) -> Result<()>
pub async fn initialize(&self) -> Result<()>
Initialize the pool with minimum connections.
Sourcepub async fn acquire(&self) -> Result<PooledClient<'_>>
pub async fn acquire(&self) -> Result<PooledClient<'_>>
Acquire a connection from the pool.
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