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

pub trait Endpoint<Bd>: IsEndpoint {
    type Output: Tuple;
    type Action: EndpointAction<Bd, Output = Self::Output>;
    fn action(&self) -> Self::Action;

    fn with_output<T: Tuple>(self) -> Self
    where
        Self: Endpoint<Bd, Output = T> + Sized
, { ... } }

Trait representing an endpoint, the main trait for abstracting HTTP services in Finchers.

The endpoint behaves as an asynchronous process that takes an HTTP request and convert it into a value of the associated type. The process that handles an request is abstracted by EndpointAction, and that instances are constructed by Endpoint for each request.

Associated Types

The type of value that will be returned from Action.

The type of EndpointAction associated with this endpoint.

Required Methods

Spawns an instance of Action that applies to an request.

Provided Methods

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

Implementations on Foreign Types

impl<'a, E, Bd> Endpoint<Bd> for &'a E where
    E: Endpoint<Bd>, 
[src]

impl<E, Bd> Endpoint<Bd> for Box<E> where
    E: Endpoint<Bd>, 
[src]

impl<E, Bd> Endpoint<Bd> for Rc<E> where
    E: Endpoint<Bd>, 
[src]

impl<E, Bd> Endpoint<Bd> for Arc<E> where
    E: Endpoint<Bd>, 
[src]

Implementors

impl<Bd> Endpoint<Bd> for MatchEos
[src]

impl<Bd> Endpoint<Bd> for MatchSegment
[src]

impl<Bd> Endpoint<Bd> for MatchVerbConnect
[src]

impl<Bd> Endpoint<Bd> for MatchVerbDelete
[src]

impl<Bd> Endpoint<Bd> for MatchVerbGet
[src]

impl<Bd> Endpoint<Bd> for MatchVerbHead
[src]

impl<Bd> Endpoint<Bd> for MatchVerbOptions
[src]

impl<Bd> Endpoint<Bd> for MatchVerbPatch
[src]

impl<Bd> Endpoint<Bd> for MatchVerbPost
[src]

impl<Bd> Endpoint<Bd> for MatchVerbPut
[src]

impl<Bd> Endpoint<Bd> for MatchVerbTrace
[src]

impl<Bd> Endpoint<Bd> for MatchVerbs
[src]

impl<Bd> Endpoint<Bd> for finchers::endpoints::body::Raw
[src]

impl<Bd> Endpoint<Bd> for ReceiveAll where
    Bd: BufStream,
    Bd::Error: Into<Box<dyn Error + Send + Sync + 'static>>, 
[src]

impl<Bd> Endpoint<Bd> for Text where
    Bd: BufStream,
    Bd::Error: Into<Box<dyn Error + Send + Sync + 'static>>, 
[src]

impl<Bd> Endpoint<Bd> for Dir
[src]

impl<Bd> Endpoint<Bd> for File
[src]

impl<Bd> Endpoint<Bd> for finchers::endpoints::header::Raw
[src]

impl<Bd> Endpoint<Bd> for finchers::endpoints::query::Raw
[src]

impl<Bd, T> Endpoint<Bd> for EndpointObj<Bd, T> where
    T: Tuple, 
[src]

impl<Bd, T> Endpoint<Bd> for LocalEndpointObj<Bd, T> where
    T: Tuple, 
[src]

impl<E, F, Bd> Endpoint<Bd> for Map<E, F> where
    E: Endpoint<Bd>,
    F: Func<E::Output> + Clone
[src]

impl<E, F, Bd, R> Endpoint<Bd> for AndThen<E, F> where
    E: Endpoint<Bd>,
    F: Func<E::Output, Out = R> + Clone,
    R: IntoFuture,
    R::Error: Into<Error>, 
[src]

impl<E, F, Bd, R> Endpoint<Bd> for MapErr<E, F> where
    E: Endpoint<Bd>,
    F: Fn(Error) -> R + Clone,
    R: Into<Error>, 
[src]

impl<E, F, Bd, R> Endpoint<Bd> for Recover<E, F> where
    E: Endpoint<Bd, Output = (R::Item,)>,
    F: Fn(Error) -> R + Clone,
    R: IntoFuture,
    R::Error: Into<Error>, 
[src]

impl<E1, E2, Bd> Endpoint<Bd> for And<E1, E2> where
    E1: Endpoint<Bd>,
    E2: Endpoint<Bd>,
    E1::Output: Combine<E2::Output>, 
[src]

impl<E1, E2, Bd> Endpoint<Bd> for OrStrict<E1, E2> where
    E1: Endpoint<Bd>,
    E2: Endpoint<Bd, Output = E1::Output>, 
[src]

impl<E1, E2, T1, T2, Bd> Endpoint<Bd> for Or<E1, E2> where
    E1: Endpoint<Bd, Output = (T1,)>,
    E2: Endpoint<Bd, Output = (T2,)>, 
[src]

impl<T, Bd> Endpoint<Bd> for Param<T> where
    T: FromEncodedStr
[src]

impl<T, Bd> Endpoint<Bd> for Path<T> where
    T: ExtractPath
[src]

impl<T, Bd> Endpoint<Bd> for Remains<T> where
    T: FromEncodedStr
[src]

impl<T, Bd> Endpoint<Bd> for Json<T> where
    Bd: BufStream,
    Bd::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
    T: DeserializeOwned
[src]

impl<T, Bd> Endpoint<Bd> for Urlencoded<T> where
    Bd: BufStream,
    Bd::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
    T: DeserializeOwned
[src]

impl<T, Bd> Endpoint<Bd> for Matches<T> where
    T: PartialEq<HeaderValue> + Clone
[src]

impl<T, Bd> Endpoint<Bd> for finchers::endpoints::header::Optional<T> where
    T: FromHeaderValue
[src]

impl<T, Bd> Endpoint<Bd> for Parse<T> where
    T: FromHeaderValue
[src]

impl<T, Bd> Endpoint<Bd> for finchers::endpoints::query::Optional<T> where
    T: DeserializeOwned
[src]

impl<T, Bd> Endpoint<Bd> for Required<T> where
    T: DeserializeOwned
[src]