Trait tsukuyomi_service::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>;
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§
sourcetype Service: Service<Request, Response = Self::Response, Error = Self::Error>
type Service: Service<Request, Response = Self::Response, Error = Self::Error>
The type of modified service.
sourcetype ModifyError
type ModifyError
The error that occurs when modifying services.
sourcetype Future: Future<Item = Self::Service, Error = Self::ModifyError>
type Future: Future<Item = Self::Service, Error = Self::ModifyError>
The type of Future
returned from modify_service
.
Required Methods§
sourcefn modify_service(&self, input: S, ctx: Ctx) -> Self::Future
fn modify_service(&self, input: S, ctx: Ctx) -> Self::Future
Modifies a service using the specified context.