pub struct AsyncPool { /* private fields */ }Expand description
Async connection pool for VoltDB
Implementations§
Source§impl AsyncPool
impl AsyncPool
Sourcepub async fn new<T: Into<Opts>>(opts: T) -> Result<AsyncPool, VoltError>
pub async fn new<T: Into<Opts>>(opts: T) -> Result<AsyncPool, VoltError>
Create a new async connection pool with default size (10 connections)
Sourcepub async fn new_manual<T: Into<Opts>>(
size: usize,
opts: T,
) -> Result<AsyncPool, VoltError>
pub async fn new_manual<T: Into<Opts>>( size: usize, opts: T, ) -> Result<AsyncPool, VoltError>
Create a new async connection pool with specified size
Sourcepub fn get_conn(&self) -> AsyncPooledConn
pub fn get_conn(&self) -> AsyncPooledConn
Get a connection from the pool (round-robin)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncPool
impl !RefUnwindSafe for AsyncPool
impl Send for AsyncPool
impl Sync for AsyncPool
impl Unpin for AsyncPool
impl !UnwindSafe for AsyncPool
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