Struct deadpool_redis::Manager [−][src]
pub struct Manager { /* fields omitted */ }
Expand description
The manager for creating and recyling lapin connections
Implementations
Create manager using PgConfig
and a TlsConnector
Trait Implementations
type Type = RedisConnection
type Type = RedisConnection
Type that the manager creates and recycles.
type Error = RedisError
type Error = RedisError
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<RedisConnection, RedisError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RedisConnection, RedisError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Create a new instance of Type
fn recycle<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut RedisConnection
) -> Pin<Box<dyn Future<Output = RecycleResult<RedisError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn recycle<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut RedisConnection
) -> Pin<Box<dyn Future<Output = RecycleResult<RedisError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Try to recycle an instance of Type
returning an Error
if the
object could not be recycled. Read more
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