Struct deadpool_postgres::Manager [−][src]
pub struct Manager { 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 Manager
[src]
impl Manager
[src]pub fn new<T>(pg_config: Config, tls: T) -> Manager where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
[src]
pub fn new<T>(pg_config: Config, tls: T) -> Manager where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
[src]Create manager using a tokio_postgres::Config
and a TlsConnector
.
pub fn from_config<T>(
pg_config: Config,
tls: T,
config: ManagerConfig
) -> Manager where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
[src]
pub fn from_config<T>(
pg_config: Config,
tls: T,
config: ManagerConfig
) -> Manager where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
[src]Create manager using a tokio_postgres::Config
and a TlsConnector
and deadpool_postgres::ManagerConfig
.
Trait Implementations
impl Manager for Manager
[src]
impl Manager for Manager
[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 !RefUnwindSafe for Manager
impl Send for Manager
impl Sync for Manager
impl Unpin for Manager
impl !UnwindSafe for Manager
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>,