Trait awc::middleware::Transform

source ·
pub trait Transform<S, Req> {
    type Transform: Service<Req>;

    // Required method
    fn new_transform(self, service: S) -> Self::Transform;
}
Expand description

Trait for transform a type to another one. Both the input and output type should impl actix_service::Service trait.

Required Associated Types§

Required Methods§

source

fn new_transform(self, service: S) -> Self::Transform

Creates and returns a new Transform component.

Implementations on Foreign Types§

source§

impl<S, Req> Transform<S, Req> for ()where S: Service<Req>,

Dummy impl for kick start NestTransform type in ClientBuilder type

§

type Transform = S

source§

fn new_transform(self, service: S) -> Self::Transform

Implementors§

source§

impl<S> Transform<S, ConnectRequest> for Redirectwhere S: Service<ConnectRequest, Response = ConnectResponse, Error = SendRequestError> + 'static,

§

type Transform = RedirectService<S>