ModifyService

Trait ModifyService 

Source
pub trait ModifyService<Ctx, Request, S> {
    type Response;
    type Error;
    type Service: Service<Request, Response = Self::Response, Error = Self::Error>;
    type ModifyError;
    type Future: Future<Item = Self::Service, Error = Self::ModifyError>;

    // Required method
    fn modify_service(&self, input: S, ctx: Ctx) -> Self::Future;
}
Expand description

A trait representing the modification of Service to another one.

Required Associated Types§

Source

type Response

The response type returned by the modified Service.

Source

type Error

The error type returned by the modified Service.

Source

type Service: Service<Request, Response = Self::Response, Error = Self::Error>

The type of modified service.

Source

type ModifyError

The error that occurs when modifying services.

Source

type Future: Future<Item = Self::Service, Error = Self::ModifyError>

The type of Future returned from modify_service.

Required Methods§

Source

fn modify_service(&self, input: S, ctx: Ctx) -> Self::Future

Modifies a service using the specified context.

Implementations on Foreign Types§

Source§

impl<Ctx, Request, S> ModifyService<Ctx, Request, S> for ()
where S: Service<Request>,

Source§

type Response = <S as Service<Request>>::Response

Source§

type Error = <S as Service<Request>>::Error

Source§

type Service = S

Source§

type ModifyError = Error

Source§

type Future = FutureResult<<() as ModifyService<Ctx, Request, S>>::Service, <() as ModifyService<Ctx, Request, S>>::ModifyError>

Source§

fn modify_service(&self, input: S, _: Ctx) -> Self::Future

Implementors§