Trait Task

Source
pub trait Task: Send {
    type Output;

    // Required method
    fn poll_task(
        &mut self,
        cx: &mut Context<'_>,
    ) -> PollResult<Self::Output, Error>;
}
Expand description

Trait representing the asynchronous computation after applying the endpoints.

See the module level documentation for details.

Required Associated Types§

Source

type Output

The inner type of an output which will be returned from this task.

Required Methods§

Source

fn poll_task(&mut self, cx: &mut Context<'_>) -> PollResult<Self::Output, Error>

Perform polling this task and get its result.

Implementations on Foreign Types§

Source§

impl<L, R> Task for Either<L, R>
where L: Task, R: Task<Output = L::Output>,

Source§

type Output = <L as Task>::Output

Source§

fn poll_task(&mut self, cx: &mut Context<'_>) -> PollResult<Self::Output, Error>

Implementors§

Source§

impl<E> Task for Abort<E>
where E: Into<Error> + Send,

Source§

impl<F> Task for TaskFuture<F>
where F: Future + Send,

Source§

type Output = Result<<F as Future>::Item, <F as Future>::Error>

Source§

impl<T: Send> Task for Ready<T>