pub trait ClassifiedWorkerFactory<C: WorkerClassification, W: ClassifiedWorker<C>>:
Send
+ Sync
+ 'static {
// Required method
fn create<'life0, 'async_trait>(
&'life0 self,
c: C,
) -> Pin<Box<dyn Future<Output = PoolResult<W>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn create<'life0, 'async_trait>(
&'life0 self,
c: C,
) -> Pin<Box<dyn Future<Output = PoolResult<W>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
c: C,
) -> Pin<Box<dyn Future<Output = PoolResult<W>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a usable worker for c.
Returning Ok asserts that the worker is ready for use. Its primary
classification must be c.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".