Struct deadpool_postgres::Manager [−][src]
pub struct Manager<T: MakeTlsConnect<Socket>> { pub statement_caches: StatementCaches, // some fields omitted }
Expand description
The manager for creating and recyling postgresql connections
Fields
statement_caches: StatementCaches
This field provides access to the statement caches of clients handed out by the pool.
Implementations
impl<T: MakeTlsConnect<Socket>> Manager<T>
[src]
impl<T: MakeTlsConnect<Socket>> Manager<T>
[src]pub fn new(pg_config: Config, tls: T) -> Manager<T>
[src]
pub fn new(pg_config: Config, tls: T) -> Manager<T>
[src]Create manager using a tokio_postgres::Config
and a TlsConnector
.
pub fn from_config(
pg_config: Config,
tls: T,
config: ManagerConfig
) -> Manager<T>
[src]
pub fn from_config(
pg_config: Config,
tls: T,
config: ManagerConfig
) -> Manager<T>
[src]Create manager using a tokio_postgres::Config
and a TlsConnector
and also
Trait Implementations
impl<T> Manager for Manager<T> where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
[src]
impl<T> Manager for Manager<T> where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
[src]type Type = ClientWrapper
type Type = ClientWrapper
Type that the manager creates and recycles.
type Error = Error
type Error = Error
The error that the manager can return when creating and recycling objects. Read more
fn create<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<ClientWrapper, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn create<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<ClientWrapper, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Create a new instance of Type
fn recycle<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 mut ClientWrapper
) -> Pin<Box<dyn Future<Output = RecycleResult<Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
fn recycle<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 mut ClientWrapper
) -> Pin<Box<dyn Future<Output = RecycleResult<Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Try to recycle an instance of Type
returning an Error
if the
object could not be recycled. Read more
fn detach(&self, object: &mut ClientWrapper)
[src]
fn detach(&self, object: &mut ClientWrapper)
[src]Detach an instance of Type
from this manager. This method is
called when using the Object::take
function for removing
an object from the pool. If the manager doesn’t hold any
references to the handed out objects the default implementation
can be used which does nothing. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Manager<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Manager<T> where
T: Send,
T: Send,
impl<T> Sync for Manager<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Manager<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Manager<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,