[−][src]Trait actix_service::Transform
Transform
service factory.
Transform factory creates service that wraps other services.
Config
is a service factory configuration type.
Associated Types
type Request
Requests handled by the service.
type Response
Responses given by the service.
type Error
Errors produced by the service.
type Transform: Service<Request = Self::Request, Response = Self::Response, Error = Self::Error>
The TransformService
value created by this factory
type InitError
Errors produced while building a service.
type Future: Future<Item = Self::Transform, Error = Self::InitError>
The future response value.
Required methods
fn new_transform(&self, service: S) -> Self::Future
Create and return a new service value asynchronously.
Provided methods
fn map_init_err<F, E>(self, f: F) -> TransformMapInitErr<Self, S, F, E> where
Self: Sized,
F: Fn(Self::InitError) -> E,
Self: Sized,
F: Fn(Self::InitError) -> E,
Map this service's factory error to a different error, returning a new transform service factory.
fn from_err<E>(self) -> TransformFromErr<Self, S, E> where
Self: Sized,
E: From<Self::InitError>,
Self: Sized,
E: From<Self::InitError>,
Map this service's init error to any error implementing From
for
this services
Error`.
Note that this function consumes the receiving transform and returns a wrapped version of it.
Implementations on Foreign Types
impl<T, S> Transform<S> for Rc<T> where
T: Transform<S>,
[src]
T: Transform<S>,
type Request = T::Request
type Response = T::Response
type Error = T::Error
type InitError = T::InitError
type Transform = T::Transform
type Future = T::Future
fn new_transform(&self, service: S) -> T::Future
[src]
fn map_init_err<F, E>(self, f: F) -> TransformMapInitErr<Self, S, F, E> where
Self: Sized,
F: Fn(Self::InitError) -> E,
[src]
Self: Sized,
F: Fn(Self::InitError) -> E,
fn from_err<E>(self) -> TransformFromErr<Self, S, E> where
Self: Sized,
E: From<Self::InitError>,
[src]
Self: Sized,
E: From<Self::InitError>,
impl<T, S> Transform<S> for Arc<T> where
T: Transform<S>,
[src]
T: Transform<S>,
type Request = T::Request
type Response = T::Response
type Error = T::Error
type InitError = T::InitError
type Transform = T::Transform
type Future = T::Future
fn new_transform(&self, service: S) -> T::Future
[src]
fn map_init_err<F, E>(self, f: F) -> TransformMapInitErr<Self, S, F, E> where
Self: Sized,
F: Fn(Self::InitError) -> E,
[src]
Self: Sized,
F: Fn(Self::InitError) -> E,
fn from_err<E>(self) -> TransformFromErr<Self, S, E> where
Self: Sized,
E: From<Self::InitError>,
[src]
Self: Sized,
E: From<Self::InitError>,