pub struct PostgresPool<F: ConnectionFactory>(/* private fields */);Implementations§
Source§impl<F: ConnectionFactory> PostgresPool<F>
impl<F: ConnectionFactory> PostgresPool<F>
pub async fn new( factory: F, settings: PostgresConnectionSettings, ) -> Result<Self, ElefantClientError>
pub fn settings(&self) -> &PostgresConnectionSettings
pub fn enum_registry(&self) -> &Arc<EnumTypeRegistry> ⓘ
Sourcepub async fn close(&self) -> Result<(), ElefantClientError>
pub async fn close(&self) -> Result<(), ElefantClientError>
Gracefully close all idle connections by sending Terminate to each.
Currently checked-out clients are not affected — close them individually
via PoolableClient::close or let them return to the pool first.
pub async fn get_client(&self) -> Result<PoolableClient<F>, ElefantClientError>
Trait Implementations§
Source§impl<F: ConnectionFactory> Clone for PostgresPool<F>
impl<F: ConnectionFactory> Clone for PostgresPool<F>
Auto Trait Implementations§
impl<F> Freeze for PostgresPool<F>
impl<F> RefUnwindSafe for PostgresPool<F>where
Arc<PostgresPoolInner<F>>: RefUnwindSafe,
impl<F> Send for PostgresPool<F>
impl<F> Sync for PostgresPool<F>
impl<F> Unpin for PostgresPool<F>
impl<F> UnsafeUnpin for PostgresPool<F>where
Arc<PostgresPoolInner<F>>: UnsafeUnpin,
impl<F> UnwindSafe for PostgresPool<F>where
Arc<PostgresPoolInner<F>>: UnwindSafe,
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