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§
Sourcefn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
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.
Sourcefn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies.
See tower_http::decompression
for more details.
Sourcefn trace_for_http(self) -> Trace<Self, HttpMakeClassifier>where
Self: Sized,
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.
Sourcefn trace_for_grpc(self) -> Trace<Self, GrpcMakeClassifier>where
Self: Sized,
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.
Sourcefn follow_redirects(self) -> FollowRedirect<Self, Standard>where
Self: Sized,
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.