Trait finchers::Task [] [src]

pub trait Task {
    type Item;
    type Error;
    type Future: Future<Item = Self::Item, Error = Self::Error>;
    fn launch(self, ctx: &mut TaskContext) -> Self::Future;
}

Abstruction of a Task, returned from an Endpoint.

This trait is an generalization of IntoFuture, extended to allow access to the instance of context at construction a Future.

Associated Types

The type on success.

The type on failure.

The type of value returned from launch.

Required Methods

Launches itself and construct a Future, and then return it.

This method will be called after the routing is completed.

Implementors