[−][src]Trait meio::prelude::LiteTask
Minimalistic actor that hasn't Address
.
Recommended to implement sequences or intensive loops (routines).
Associated Types
Loading content...Provided methods
pub fn name(&self) -> String
[src]
Returns unique name of the LiteTask
.
Uses Uuid
by default.
#[must_use]pub fn routine<'async_trait>(
self,
stop: StopReceiver
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
self,
stop: StopReceiver
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
Routine of the task that can contain loops. It can taks into accout provided receiver to implement graceful interruption.
By default uses the following calling chain that you can override at any step:
routine
-> interruptable_routine
-> repeatable_routine
-> retry_at
-> retry_delay
#[must_use]pub fn interruptable_routine<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
self
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
Routine that can be unconditionally interrupted.
#[must_use]pub fn repeatable_routine<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Routine that can be retried in case of fail.
pub fn retry_at(&self, _last_attempt: Instant) -> Instant
[src]
When to do the next attempt for repeatable_routine
.
pub fn retry_delay(&self, _last_attempt: Instant) -> Duration
[src]
How long to wait to retry. Called by retry_at
method.