pub struct PostgresConnectionManager<T>{ /* private fields */ }
Expand description
A ManageConnection
for tokio_postgres::Connection
s.
Implementations§
Trait Implementations§
Source§impl<T> Debug for PostgresConnectionManager<T>
impl<T> Debug for PostgresConnectionManager<T>
Source§impl<T> ManageConnection for PostgresConnectionManager<T>where
T: 'static + MakeTlsConnect<Socket> + Clone + Send + Sync,
T::Stream: Send + Sync,
T::TlsConnect: Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
impl<T> ManageConnection for PostgresConnectionManager<T>where
T: 'static + MakeTlsConnect<Socket> + Clone + Send + Sync,
T::Stream: Send + Sync,
T::TlsConnect: Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
Source§type Connection = AsyncConnection
type Connection = AsyncConnection
The connection type this manager deals with.
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Error<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Error<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Attempts to create a new connection. Read more
Source§fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Connection,
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Connection,
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Determines if the connection is still connected to the database. Read more
Source§fn has_broken(&self, conn: &mut Self::Connection) -> bool
fn has_broken(&self, conn: &mut Self::Connection) -> bool
Quick check to determine if the connection has broken
Auto Trait Implementations§
impl<T> Freeze for PostgresConnectionManager<T>where
T: Freeze,
impl<T> RefUnwindSafe for PostgresConnectionManager<T>where
T: RefUnwindSafe,
impl<T> Send for PostgresConnectionManager<T>
impl<T> Sync for PostgresConnectionManager<T>
impl<T> Unpin for PostgresConnectionManager<T>where
T: Unpin,
impl<T> UnwindSafe for PostgresConnectionManager<T>where
T: 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