Struct meio::handlers::InteractionTask [−][src]
pub struct InteractionTask<I: Interaction> { /* fields omitted */ }
Expand description
Interaction task that can be awaited or aattached to a Context
.
Implementations
impl<I: Interaction> InteractionTask<I>
[src]
impl<I: Interaction> InteractionTask<I>
[src]Trait Implementations
impl<I> LiteTask for InteractionTask<I> where
I: Interaction,
[src]
impl<I> LiteTask for InteractionTask<I> where
I: Interaction,
[src]fn interruptable_routine<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
fn interruptable_routine<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]Routine that can be unconditionally interrupted.
#[must_use]fn routine<'async_trait>(
self,
stop: StopReceiver
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
#[must_use]fn routine<'async_trait>(
self,
stop: StopReceiver
) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]Routine of the task that can contain loops. It can taks into accout provided receiver to implement graceful interruption. Read more
#[must_use]fn repeatable_routine<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Output>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn repeatable_routine<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Output>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Routine that will be repeated till fail or success. Read more
fn retry_at(&self, _last_attempt: Instant) -> Instant
[src]
fn retry_at(&self, _last_attempt: Instant) -> Instant
[src]When to do the next attempt for repeatable_routine
.
fn retry_delay(&self, _last_attempt: Instant) -> Duration
[src]
fn retry_delay(&self, _last_attempt: Instant) -> Duration
[src]How long to wait to retry. Called by retry_at
method.
impl<T, I, M> TaskEliminated<InteractionTask<I>, M> for T where
T: InteractionDone<I, M>,
I: Interaction,
M: Tag,
[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]
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]Called when the Task
finished.
Auto Trait Implementations
impl<I> !RefUnwindSafe for InteractionTask<I>
impl<I> Send for InteractionTask<I>
impl<I> !Sync for InteractionTask<I>
impl<I> Unpin for InteractionTask<I> where
I: Unpin,
I: Unpin,