[−][src]Trait deadpool::Manager
This trait is used to create
new objects or recycle
existing ones.
Required methods
fn create<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Create a new instance of T
fn recycle<'life0, 'life1, 'async_trait>(
&'life0 self,
obj: &'life1 mut T
) -> Pin<Box<dyn Future<Output = RecycleResult<E>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
obj: &'life1 mut T
) -> Pin<Box<dyn Future<Output = RecycleResult<E>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Try to recycle an instance of T
returning None` if the
object could not be recycled.