Trait finchers::endpoint::Endpoint[][src]

pub trait Endpoint<'a>: 'a {
    type Output: Tuple;
    type Future: Future<Item = Self::Output, Error = Error> + 'a;
    fn apply(&'a self, ecx: &mut ApplyContext) -> ApplyResult<Self::Future>;

    fn with_output<T: Tuple>(self) -> Self
    where
        Self: Endpoint<'a, Output = T> + Sized
, { ... }
fn wrap<W>(self, wrapper: W) -> W::Endpoint
    where
        Self: Sized,
        W: Wrapper<'a, Self>
, { ... } }

Trait representing an endpoint.

Associated Types

The inner type associated with this endpoint.

The type of value which will be returned from apply.

Required Methods

Perform checking the incoming HTTP request and returns an instance of the associated Future if matched.

Provided Methods

Add an annotation that the associated type Output is fixed to T.

Converts self using the provided Wrapper.

Implementations on Foreign Types

impl<'a, E: Endpoint<'a>> Endpoint<'a> for Box<E>
[src]

impl<'a, E: Endpoint<'a>> Endpoint<'a> for Rc<E>
[src]

impl<'a, E: Endpoint<'a>> Endpoint<'a> for Arc<E>
[src]

Implementors