Trait meio::handlers::TaskEliminated[][src]

pub trait TaskEliminated<T: LiteTask, M: Tag>: Actor {
    #[must_use]
    fn handle<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        id: IdOf<T>,
        tag: M,
        result: Result<T::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
; }

Listens for spawned tasks finished.

Required methods

#[must_use]
fn handle<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    id: IdOf<T>,
    tag: M,
    result: Result<T::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, 
[src]

Called when the Task finished.

Loading content...

Implementors

impl<T> TaskEliminated<HeartBeat, ()> for T where
    T: OnTick
[src]

fn handle<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    _id: IdOf<HeartBeat>,
    _tag: (),
    _result: Result<(), 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, 
[src]

impl<T, I, M> TaskEliminated<InteractionTask<I>, M> for T where
    T: InteractionDone<I, M>,
    I: Interaction,
    M: Tag
[src]

fn handle<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    _id: IdOf<InteractionTask<I>>,
    tag: M,
    result: Result<I::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, 
[src]

Loading content...