Struct meio::tasks::fn_task::FnTask [−][src]
pub struct FnTask<T>(pub T);
Expand description
Functional LiteTask
.
Tuple Fields
0: T
Trait Implementations
Allows to use async closures as lite tasks.
type Output = O
type Output = O
The result of a finished task.
The log target for the LiteTask
.
Routine that can be unconditionally interrupted.
Routine of the task that can contain loops. It can taks into accout provided receiver to implement graceful interruption. Read more
Called before repeatable_routine
for initialization.
The routine will be interrupted if this method failed. Read more
Routine that will be repeated till fail or success. Read more
impl<T, F, M> TaskEliminated<FnTask<F>, M> for T where
FnTask<F>: LiteTask,
T: FnTaskEliminated<<FnTask<F> as LiteTask>::Output, M>,
M: Tag,
impl<T, F, M> TaskEliminated<FnTask<F>, M> for T where
FnTask<F>: LiteTask,
T: FnTaskEliminated<<FnTask<F> as LiteTask>::Output, M>,
M: Tag,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: IdOf<FnTask<F>>,
tag: M,
result: Result<<FnTask<F> as LiteTask>::Output, TaskError>,
ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: IdOf<FnTask<F>>,
tag: M,
result: Result<<FnTask<F> as LiteTask>::Output, TaskError>,
ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Called when the Task
finished.