Trait ServiceExt

Source
pub trait ServiceExt {
    // Provided methods
    fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
       where Self: Sized { ... }
    fn decompression(self) -> Decompression<Self>
       where Self: Sized { ... }
    fn trace_for_http(self) -> Trace<Self, HttpMakeClassifier>
       where Self: Sized { ... }
    fn trace_for_grpc(self) -> Trace<Self, GrpcMakeClassifier>
       where Self: Sized { ... }
    fn follow_redirects(self) -> FollowRedirect<Self, Standard>
       where Self: Sized { ... }
}
Expand description

Extension trait that adds methods to any Service for adding middleware from tower-http.

Provided Methods§

Source

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body.

See tower_http::map_response_body for more details.

Source

fn decompression(self) -> Decompression<Self>
where Self: Sized,

Decompress response bodies.

See tower_http::decompression for more details.

Source

fn trace_for_http(self) -> Trace<Self, HttpMakeClassifier>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes.

This method does not support customizing the output, to do that use TraceLayer instead.

See tower_http::trace for more details.

Source

fn trace_for_grpc(self) -> Trace<Self, GrpcMakeClassifier>
where Self: Sized,

High level tracing that classifies responses using gRPC headers.

This method does not support customizing the output, to do that use TraceLayer instead.

See tower_http::trace for more details.

Source

fn follow_redirects(self) -> FollowRedirect<Self, Standard>
where Self: Sized,

Follow redirect resposes using the Standard policy.

See tower_http::follow_redirect for more details.

Implementors§

Source§

impl<T> ServiceExt for T