pub trait Worker {
// Required method
fn perform_work<'life0, 'life1, 'async_trait>(
&'life0 self,
incomplete_works: &'life1 [IncompleteWork],
) -> Pin<Box<dyn Future<Output = Result<Vec<CompletedWork>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Methods§
sourcefn perform_work<'life0, 'life1, 'async_trait>(
&'life0 self,
incomplete_works: &'life1 [IncompleteWork],
) -> Pin<Box<dyn Future<Output = Result<Vec<CompletedWork>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn perform_work<'life0, 'life1, 'async_trait>(
&'life0 self,
incomplete_works: &'life1 [IncompleteWork],
) -> Pin<Box<dyn Future<Output = Result<Vec<CompletedWork>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a certain amount of work, it returns after the work is completely done rather than a stream
The caller of this function should be sent small amount of work so that the calle doesn’t await too long