pub struct ConnectionPool<M>{ /* private fields */ }Implementations§
Source§impl<M> ConnectionPool<M>
impl<M> ConnectionPool<M>
pub fn new( max_size: Option<usize>, max_idle_time: Option<Duration>, connection_timeout: Option<Duration>, cleanup_config: Option<CleanupConfig>, manager: M, ) -> Arc<Self>
pub async fn get_connection( self: Arc<Self>, ) -> Result<PooledStream<M>, PoolError<M::Error>>
Sourcepub async fn stop_cleanup_task(&self)
pub async fn stop_cleanup_task(&self)
Stop the background cleanup task
Sourcepub async fn restart_cleanup_task(&self, cleanup_config: CleanupConfig)
pub async fn restart_cleanup_task(&self, cleanup_config: CleanupConfig)
Restart the background cleanup task with new configuration
Auto Trait Implementations§
impl<M> Freeze for ConnectionPool<M>where
M: Freeze,
impl<M> !RefUnwindSafe for ConnectionPool<M>
impl<M> Send for ConnectionPool<M>
impl<M> Sync for ConnectionPool<M>
impl<M> Unpin for ConnectionPool<M>where
M: Unpin,
impl<M> !UnwindSafe for ConnectionPool<M>
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