Trait finchers::endpoint::wrapper::Wrapper [−][src]
pub trait Wrapper<'a, E: Endpoint<'a>> { type Output: Tuple; type Endpoint: Endpoint<'a, Output = Self::Output>; fn wrap(self, endpoint: E) -> Self::Endpoint; }
A trait representing the conversion of an endpoint to another endpoint.
Associated Types
type Output: Tuple
The inner type of converted Endpoint
.
type Endpoint: Endpoint<'a, Output = Self::Output>
The type of converted Endpoint
.
Required Methods
fn wrap(self, endpoint: E) -> Self::Endpoint
Performs conversion from the provided endpoint into Self::Endpoint
.
Implementors
impl<'a, E, F> Wrapper<'a, E> for AfterApply<F> where
E: Endpoint<'a>,
F: Fn(&mut ApplyContext) -> ApplyResult<()> + 'a, type Output = E::Output; type Endpoint = AfterApplyEndpoint<E, F>;impl<'a, E, F> Wrapper<'a, E> for AndThen<E::Output, F> where
E: Endpoint<'a>,
F: Func<E::Output> + 'a,
F::Out: IntoFuture<Error = Error>, type Output = (<F::Out as IntoFuture>::Item,); type Endpoint = AndThenEndpoint<E, F>;impl<'a, E, F> Wrapper<'a, E> for BeforeApply<F> where
E: Endpoint<'a>,
F: Fn(&mut ApplyContext) -> ApplyResult<()> + 'a, type Output = E::Output; type Endpoint = BeforeApplyEndpoint<E, F>;impl<'a, E, F> Wrapper<'a, E> for Map<E::Output, F> where
E: Endpoint<'a>,
F: Func<E::Output> + 'a, type Output = (F::Out,); type Endpoint = MapEndpoint<E, F>;impl<'a, E: Endpoint<'a>> Wrapper<'a, E> for OrReject type Output = E::Output; type Endpoint = OrRejectEndpoint<E>;
impl<'a, E, F, R> Wrapper<'a, E> for OrRejectWith<F> where
E: Endpoint<'a>,
F: Fn(ApplyError, &mut ApplyContext) -> R + 'a,
R: Into<Error> + 'a, type Output = E::Output; type Endpoint = OrRejectWithEndpoint<E, F>;impl<'a, E, F, R> Wrapper<'a, E> for Recover<F> where
E: Endpoint<'a>,
F: Fn(Error) -> R + 'a,
R: Future<Error = Error> + 'a, type Output = (Recovered<E::Output, R::Item>,); type Endpoint = RecoverEndpoint<E, F>;