Struct Request

pub struct Request<T = Body> { /* private fields */ }
Expand description

Represents an HTTP request.

An HTTP request consists of a head and a potentially optional body. The body component is generic, enabling arbitrary types to represent the HTTP body. For example, the body could be Vec<u8>, a Stream of byte chunks, or a value that has been deserialized.

§Examples

Creating a Request to send

use http::{Request, Response};

let mut request = Request::builder()
    .uri("https://www.rust-lang.org/")
    .header("User-Agent", "my-awesome-agent/1.0");

if needs_awesome_header() {
    request = request.header("Awesome", "yes");
}

let response = send(request.body(()).unwrap());

fn send(req: Request<()>) -> Response<()> {
    // ...
}

Inspecting a request to see what was sent.

use http::{Request, Response, StatusCode};

fn respond_to(req: Request<()>) -> http::Result<Response<()>> {
    if req.uri() != "/awesome-url" {
        return Response::builder()
            .status(StatusCode::NOT_FOUND)
            .body(())
    }

    let has_awesome_header = req.headers().contains_key("Awesome");
    let body = req.body();

    // ...
}

Deserialize a request of bytes via json:

use http::Request;
use serde::de;

fn deserialize<T>(req: Request<Vec<u8>>) -> serde_json::Result<Request<T>>
    where for<'de> T: de::Deserialize<'de>,
{
    let (parts, body) = req.into_parts();
    let body = serde_json::from_slice(&body)?;
    Ok(Request::from_parts(parts, body))
}

Or alternatively, serialize the body of a request to json

use http::Request;
use serde::ser;

fn serialize<T>(req: Request<T>) -> serde_json::Result<Request<Vec<u8>>>
    where T: ser::Serialize,
{
    let (parts, body) = req.into_parts();
    let body = serde_json::to_vec(&body)?;
    Ok(Request::from_parts(parts, body))
}

Implementations§

§

impl Request<()>

pub fn builder() -> Builder

Creates a new builder-style object to manufacture a Request

This method returns an instance of Builder which can be used to create a Request.

§Examples
let request = Request::builder()
    .method("GET")
    .uri("https://www.rust-lang.org/")
    .header("X-Custom-Foo", "Bar")
    .body(())
    .unwrap();

pub fn get<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with a GET method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::get("https://www.rust-lang.org/")
    .body(())
    .unwrap();

pub fn put<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with a PUT method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::put("https://www.rust-lang.org/")
    .body(())
    .unwrap();

pub fn post<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with a POST method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::post("https://www.rust-lang.org/")
    .body(())
    .unwrap();

pub fn delete<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with a DELETE method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::delete("https://www.rust-lang.org/")
    .body(())
    .unwrap();

pub fn options<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with an OPTIONS method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::options("https://www.rust-lang.org/")
    .body(())
    .unwrap();

pub fn head<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with a HEAD method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::head("https://www.rust-lang.org/")
    .body(())
    .unwrap();

pub fn connect<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with a CONNECT method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::connect("https://www.rust-lang.org/")
    .body(())
    .unwrap();

pub fn patch<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with a PATCH method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::patch("https://www.rust-lang.org/")
    .body(())
    .unwrap();

pub fn trace<T>(uri: T) -> Builder
where T: TryInto<Uri>, <T as TryInto<Uri>>::Error: Into<Error>,

Creates a new Builder initialized with a TRACE method and the given URI.

This method returns an instance of Builder which can be used to create a Request.

§Example

let request = Request::trace("https://www.rust-lang.org/")
    .body(())
    .unwrap();
§

impl<T> Request<T>

pub fn new(body: T) -> Request<T>

Creates a new blank Request with the body

The component parts of this request will be set to their default, e.g. the GET method, no headers, etc.

§Examples
let request = Request::new("hello world");

assert_eq!(*request.method(), Method::GET);
assert_eq!(*request.body(), "hello world");

pub fn from_parts(parts: Parts, body: T) -> Request<T>

Creates a new Request with the given components parts and body.

§Examples
let request = Request::new("hello world");
let (mut parts, body) = request.into_parts();
parts.method = Method::POST;

let request = Request::from_parts(parts, body);

pub fn method(&self) -> &Method

Returns a reference to the associated HTTP method.

§Examples
let request: Request<()> = Request::default();
assert_eq!(*request.method(), Method::GET);

pub fn method_mut(&mut self) -> &mut Method

Returns a mutable reference to the associated HTTP method.

§Examples
let mut request: Request<()> = Request::default();
*request.method_mut() = Method::PUT;
assert_eq!(*request.method(), Method::PUT);

pub fn uri(&self) -> &Uri

Returns a reference to the associated URI.

§Examples
let request: Request<()> = Request::default();
assert_eq!(*request.uri(), *"/");

pub fn uri_mut(&mut self) -> &mut Uri

Returns a mutable reference to the associated URI.

§Examples
let mut request: Request<()> = Request::default();
*request.uri_mut() = "/hello".parse().unwrap();
assert_eq!(*request.uri(), *"/hello");

pub fn version(&self) -> Version

Returns the associated version.

§Examples
let request: Request<()> = Request::default();
assert_eq!(request.version(), Version::HTTP_11);

pub fn version_mut(&mut self) -> &mut Version

Returns a mutable reference to the associated version.

§Examples
let mut request: Request<()> = Request::default();
*request.version_mut() = Version::HTTP_2;
assert_eq!(request.version(), Version::HTTP_2);

pub fn headers(&self) -> &HeaderMap

Returns a reference to the associated header field map.

§Examples
let request: Request<()> = Request::default();
assert!(request.headers().is_empty());

pub fn headers_mut(&mut self) -> &mut HeaderMap

Returns a mutable reference to the associated header field map.

§Examples
let mut request: Request<()> = Request::default();
request.headers_mut().insert(HOST, HeaderValue::from_static("world"));
assert!(!request.headers().is_empty());

pub fn extensions(&self) -> &Extensions

Returns a reference to the associated extensions.

§Examples
let request: Request<()> = Request::default();
assert!(request.extensions().get::<i32>().is_none());

pub fn extensions_mut(&mut self) -> &mut Extensions

Returns a mutable reference to the associated extensions.

§Examples
let mut request: Request<()> = Request::default();
request.extensions_mut().insert("hello");
assert_eq!(request.extensions().get(), Some(&"hello"));

pub fn body(&self) -> &T

Returns a reference to the associated HTTP body.

§Examples
let request: Request<String> = Request::default();
assert!(request.body().is_empty());

pub fn body_mut(&mut self) -> &mut T

Returns a mutable reference to the associated HTTP body.

§Examples
let mut request: Request<String> = Request::default();
request.body_mut().push_str("hello world");
assert!(!request.body().is_empty());

pub fn into_body(self) -> T

Consumes the request, returning just the body.

§Examples
let request = Request::new(10);
let body = request.into_body();
assert_eq!(body, 10);

pub fn into_parts(self) -> (Parts, T)

Consumes the request returning the head and body parts.

§Examples
let request = Request::new(());
let (parts, body) = request.into_parts();
assert_eq!(parts.method, Method::GET);

pub fn map<F, U>(self, f: F) -> Request<U>
where F: FnOnce(T) -> U,

Consumes the request returning a new request with body mapped to the return type of the passed in function.

§Examples
let request = Request::builder().body("some string").unwrap();
let mapped_request: Request<&[u8]> = request.map(|b| {
  assert_eq!(b, "some string");
  b.as_bytes()
});
assert_eq!(mapped_request.body(), &"some string".as_bytes());

Trait Implementations§

§

impl<Body> BodyExtractExt for Request<Body>
where Body: Body + Send + 'static, <Body as Body>::Data: Send + 'static, <Body as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

async fn try_into_json<T>(self) -> Result<T, OpaqueError>
where T: DeserializeOwned + Send + 'static,

Try to deserialize the (contained) body as a JSON object.
§

async fn try_into_string(self) -> Result<String, OpaqueError>

Try to turn the (contained) body in an utf-8 string.
§

impl<T> Clone for Request<T>
where T: Clone,

§

fn clone(&self) -> Request<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<B> ContextSmuggler for Request<B>

§

fn inject_ctx(&mut self, ctx: Context)

inject the context into the smuggler.
§

fn try_extract_ctx(&mut self) -> Option<Context>

try to extract the smuggled context out of the smuggle, which is only possible once.
§

impl<T> Debug for Request<T>
where T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> Default for Request<T>
where T: Default,

§

fn default() -> Request<T>

Returns the “default value” for a type. Read more
§

impl<T> From<Request<T>> for Request<T>

§

fn from(value: Request<T>) -> Request<T>

Converts to this type from the input type.
§

impl<T> From<Request<T>> for Request<T>

§

fn from(value: Request<T>) -> Request<T>

Converts to this type from the input type.
§

impl FromRequest for Request

§

type Rejection = Infallible

If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a response.
§

async fn from_request( req: Request, ) -> Result<Request, <Request as FromRequest>::Rejection>

Perform the extraction.
§

impl<Body> HeaderValueGetter for Request<Body>

§

fn header_str<K>(&self, key: K) -> Result<&str, HeaderValueErr>
where K: AsHeaderName + Copy,

Get a header value as a string.
§

fn header_bytes<K>(&self, key: K) -> Result<&[u8], HeaderValueErr>
where K: AsHeaderName + Copy,

Get a header value as a byte slice.
§

impl<Body> HttpRequestParts for Request<Body>

§

fn method(&self) -> &Method

§

fn uri(&self) -> &Uri

§

fn version(&self) -> Version

§

fn headers(&self) -> &HeaderMap

§

fn extensions(&self) -> &Extensions

§

impl<Body> HttpRequestPartsMut for Request<Body>

§

fn method_mut(&mut self) -> &mut Method

§

fn uri_mut(&mut self) -> &mut Uri

§

fn version_mut(&mut self) -> &mut Version

§

fn headers_mut(&mut self) -> &mut HeaderMap

§

fn extensions_mut(&mut self) -> &mut Extensions

§

impl<Body> Matcher<Request<Body>> for DomainMatcher

§

fn matches( &self, ext: Option<&mut Extensions>, ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for HeaderMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, _ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for HttpMatcher<Body>
where Body: Send + 'static,

§

fn matches( &self, ext: Option<&mut Extensions>, ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for HttpMatcherKind<Body>
where Body: Send + 'static,

§

fn matches( &self, ext: Option<&mut Extensions>, ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for IpNetMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, ctx: &Context, _req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for LoopbackMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, ctx: &Context, _req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for MethodMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, _ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise

§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for PathMatcher

§

fn matches( &self, ext: Option<&mut Extensions>, _ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for PortMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, ctx: &Context, _req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for PrivateIpNetMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, ctx: &Context, _req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for SocketAddressMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, ctx: &Context, _req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for SocketMatcher<Request<Body>>
where Body: 'static,

§

fn matches( &self, ext: Option<&mut Extensions>, ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for SubdomainTrieMatcher

§

fn matches( &self, ext: Option<&mut Extensions>, ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for UriMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, _ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for VersionMatcher

§

fn matches( &self, _ext: Option<&mut Extensions>, _ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise

§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> Matcher<Request<Body>> for WebSocketMatcher
where Body: Send + 'static,

§

fn matches( &self, _ext: Option<&mut Extensions>, _ctx: &Context, req: &Request<Body>, ) -> bool

returns true on a match, false otherwise Read more
§

fn or<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Provide an alternative matcher to match if the current one does not match.
§

fn and<M>(self, other: M) -> impl Matcher<Request>
where Self: Sized, M: Matcher<Request>,

Add another condition to match on top of the current one.
§

fn not(self) -> impl Matcher<Request>
where Self: Sized,

Negate the current condition.
§

impl<Body> ReqToConnID<Request<Body>> for BasicHttpConnIdentifier

§

type ID = (Protocol, Authority)

§

fn id( &self, ctx: &Context, req: &Request<Body>, ) -> Result<<BasicHttpConnIdentifier as ReqToConnID<Request<Body>>>::ID, OpaqueError>

§

impl<Body> RequestSwitchVersionExt for Request<Body>

§

fn switch_version(&mut self, target_version: Version) -> Result<(), OpaqueError>

§

impl<Body, S> Service<Request<Body>> for DnsResolveModeService<S>
where Body: Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>> + Send + Sync + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = OpaqueError

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, request: Request<Body>, ) -> Result<<DnsResolveModeService<S> as Service<Request<Body>>>::Response, <DnsResolveModeService<S> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
Source§

impl<Body, ModifiedBody, ConnResponse> Service<Request<Body>> for EasyHttpWebClient<Body, EstablishedClientConnection<ConnResponse, Request<ModifiedBody>>>
where Body: StreamingBody<Data: Send + 'static, Error: Into<BoxError>> + Unpin + Send + 'static, ModifiedBody: StreamingBody<Data: Send + 'static, Error: Into<BoxError>> + Unpin + Send + 'static, ConnResponse: Service<Request<ModifiedBody>, Response = Response, Error = BoxError>,

Source§

type Response = Response

The type of response returned by the service.
Source§

type Error = OpaqueError

The type of error returned by the service.
Source§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<Self::Response, Self::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Body> Service<Request<Body>> for ErrorHandler<S>
where S: Service<Request<Body>>, <S as Service<Request<Body>>>::Response: IntoResponse, <S as Service<Request<Body>>>::Error: IntoResponse, Body: Send + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<ErrorHandler<S> as Service<Request<Body>>>::Response, <ErrorHandler<S> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, F, R, Body> Service<Request<Body>> for ErrorHandler<S, F>
where S: Service<Request<Body>>, <S as Service<Request<Body>>>::Response: IntoResponse, F: Fn(<S as Service<Request<Body>>>::Error) -> R + Clone + Send + Sync + 'static, R: IntoResponse + 'static, Body: Send + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<ErrorHandler<S, F> as Service<Request<Body>>>::Response, <ErrorHandler<S, F> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<H, S, Body> Service<Request<Body>> for GetForwardedHeaderService<S, H>
where H: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeaderService<S, H> as Service<Request<Body>>>::Response, <GetForwardedHeaderService<S, H> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1,)>
where T1: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1,)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1,)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4, T5)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4, T5)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4, T5)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, T8, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, T9: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, T9: ForwardHeader + Send + Sync + 'static, T10: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, T9: ForwardHeader + Send + Sync + 'static, T10: ForwardHeader + Send + Sync + 'static, T11: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, S, Body> Service<Request<Body>> for GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, T9: ForwardHeader + Send + Sync + 'static, T10: ForwardHeader + Send + Sync + 'static, T11: ForwardHeader + Send + Sync + 'static, T12: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> as Service<Request<Body>>>::Response, <GetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T, S, Body, E> Service<Request<Body>> for HeaderConfigService<T, S>
where S: Service<Request<Body>, Error = E>, T: DeserializeOwned + Clone + Send + Sync + 'static, Body: Send + Sync + 'static, E: Into<Box<dyn Error + Sync + Send>> + Send + Sync + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, request: Request<Body>, ) -> Result<<HeaderConfigService<T, S> as Service<Request<Body>>>::Response, <HeaderConfigService<T, S> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T, S, Body, E, C> Service<Request<Body>> for HeaderFromStrConfigService<T, S, C>
where S: Service<Request<Body>, Error = E>, T: FromStr + Send + Sync + 'static + Clone, <T as FromStr>::Err: Into<Box<dyn Error + Sync + Send>> + Send + Sync + 'static, C: FromIterator<T> + Send + Sync + 'static + Clone, Body: Send + Sync + 'static, E: Into<Box<dyn Error + Sync + Send>> + Send + Sync + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, request: Request<Body>, ) -> Result<<HeaderFromStrConfigService<T, S, C> as Service<Request<Body>>>::Response, <HeaderFromStrConfigService<T, S, C> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<T, S, Body, E> Service<Request<Body>> for HeaderOptionValueService<T, S>
where S: Service<Request<Body>, Error = E>, T: Default + Clone + Send + Sync + 'static, Body: Send + Sync + 'static, E: Into<Box<dyn Error + Sync + Send>> + Send + Sync + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, request: Request<Body>, ) -> Result<<HeaderOptionValueService<T, S> as Service<Request<Body>>>::Response, <HeaderOptionValueService<T, S> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<Body, ResBody> Service<Request<Body>> for Redirect<ResBody>
where Body: Send + 'static, ResBody: Default + Send + 'static,

§

type Response = Response<ResBody>

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, _ctx: Context, _req: Request<Body>, ) -> Result<<Redirect<ResBody> as Service<Request<Body>>>::Response, <Redirect<ResBody> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, F, Body> Service<Request<Body>> for RequestMetricsService<S, F>
where S: Service<Request>, <S as Service<Request>>::Response: IntoResponse, F: AttributesFactory, Body: Body<Data = Bytes> + Send + Sync + 'static, <Body as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = Response

The type of response returned by the service.
§

type Error = <S as Service<Request>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<RequestMetricsService<S, F> as Service<Request<Body>>>::Response, <RequestMetricsService<S, F> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<P, S, Body> Service<Request<Body>> for Retry<P, S>
where P: Policy<<S as Service<Request<RetryBody>>>::Response, <S as Service<Request<RetryBody>>>::Error>, S: Service<Request<RetryBody>>, <S as Service<Request<RetryBody>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Body + Send + 'static, <Body as Body>::Data: Send + 'static, <Body as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = <S as Service<Request<RetryBody>>>::Response

The type of response returned by the service.
§

type Error = RetryError

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, request: Request<Body>, ) -> Result<<Retry<P, S> as Service<Request<Body>>>::Response, <Retry<P, S> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, H, Body> Service<Request<Body>> for SetForwardedHeaderService<S, H>
where S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, H: ForwardHeader + Send + Sync + 'static, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeaderService<S, H> as Service<Request<Body>>>::Response, <SetForwardedHeaderService<S, H> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1,)>
where T1: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1,)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1,)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4, T5)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4, T5)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4, T5)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, T8, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, T9: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, T9: ForwardHeader + Send + Sync + 'static, T10: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, T9: ForwardHeader + Send + Sync + 'static, T10: ForwardHeader + Send + Sync + 'static, T11: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, Body> Service<Request<Body>> for SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>
where T1: ForwardHeader + Send + Sync + 'static, T2: ForwardHeader + Send + Sync + 'static, T3: ForwardHeader + Send + Sync + 'static, T4: ForwardHeader + Send + Sync + 'static, T5: ForwardHeader + Send + Sync + 'static, T6: ForwardHeader + Send + Sync + 'static, T7: ForwardHeader + Send + Sync + 'static, T8: ForwardHeader + Send + Sync + 'static, T9: ForwardHeader + Send + Sync + 'static, T10: ForwardHeader + Send + Sync + 'static, T11: ForwardHeader + Send + Sync + 'static, T12: ForwardHeader + Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> as Service<Request<Body>>>::Response, <SetForwardedHeadersService<S, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Body> Service<Request<Body>> for SetProxyAuthHttpHeaderService<S>
where S: Service<Request<Body>>, Body: Send + 'static,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<SetProxyAuthHttpHeaderService<S> as Service<Request<Body>>>::Response, <SetProxyAuthHttpHeaderService<S> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<Body> Service<Request<Body>> for Upgrade
where Body: Send + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<Upgrade as Service<Request<Body>>>::Response, <Upgrade as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Body> Service<Request<Body>> for UserAgentClassifier<S>
where S: Service<Request<Body>>,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<Body>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<Body>, ) -> impl Future<Output = Result<<UserAgentClassifier<S> as Service<Request<Body>>>::Response, <UserAgentClassifier<S> as Service<Request<Body>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<Body, S, P> Service<Request<Body>> for UserAgentEmulateService<S, P>
where Body: Send + Sync + 'static, S: Service<Request<Body>>, <S as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>>, P: UserAgentProvider,

§

type Response = <S as Service<Request<Body>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<UserAgentEmulateService<S, P> as Service<Request<Body>>>::Response, <UserAgentEmulateService<S, P> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<Body> Service<Request<Body>> for WebSocketAcceptor
where Body: Send + 'static,

§

type Response = (Response, Context, Request<Body>)

The type of response returned by the service.
§

type Error = Response

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<WebSocketAcceptor as Service<Request<Body>>>::Response, <WebSocketAcceptor as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, Body> Service<Request<Body>> for WebSocketAcceptorService<S>
where S: Clone + Service<ServerWebSocket, Response = ()>, Body: Send + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = <S as Service<ServerWebSocket>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<Body>, ) -> Result<<WebSocketAcceptorService<S> as Service<Request<Body>>>::Response, <WebSocketAcceptorService<S> as Service<Request<Body>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<BodyIn, BodyOut, I> Service<Request<BodyIn>> for HttpClientService<BodyOut, I>
where BodyIn: Send + 'static, BodyOut: Body + Unpin + Send + 'static, <BodyOut as Body>::Data: Send + 'static, <BodyOut as Body>::Error: Into<Box<dyn Error + Sync + Send>>, I: RequestInspector<Request<BodyIn>, RequestOut = Request<BodyOut>>, <I as RequestInspector<Request<BodyIn>>>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<BodyIn>, ) -> Result<<HttpClientService<BodyOut, I> as Service<Request<BodyIn>>>::Response, <HttpClientService<BodyOut, I> as Service<Request<BodyIn>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, I1, I2, BodyIn, BodyOut> Service<Request<BodyIn>> for HttpConnector<S, I1, I2>
where I1: RequestInspector<Request<BodyIn>, RequestOut = Request<BodyIn>>, <I1 as RequestInspector<Request<BodyIn>>>::Error: Into<Box<dyn Error + Sync + Send>>, I2: RequestInspector<Request<BodyIn>, RequestOut = Request<BodyOut>> + Clone, <I2 as RequestInspector<Request<BodyIn>>>::Error: Into<Box<dyn Error + Sync + Send>>, S: ConnectorService<Request<BodyIn>>, <S as ConnectorService<Request<BodyIn>>>::Connection: Stream + Unpin, <S as ConnectorService<Request<BodyIn>>>::Error: Into<Box<dyn Error + Sync + Send>>, BodyIn: Body + Unpin + Send + 'static, <BodyIn as Body>::Data: Send + 'static, <BodyIn as Body>::Error: Into<Box<dyn Error + Sync + Send>>, BodyOut: Body + Unpin + Send + 'static, <BodyOut as Body>::Data: Send + 'static, <BodyOut as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = EstablishedClientConnection<HttpClientService<BodyOut, I2>, <I1 as RequestInspector<Request<BodyIn>>>::RequestOut>

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<BodyIn>, ) -> Result<<HttpConnector<S, I1, I2> as Service<Request<BodyIn>>>::Response, <HttpConnector<S, I1, I2> as Service<Request<BodyIn>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for AddAuthorization<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<AddAuthorization<S> as Service<Request<ReqBody>>>::Response, <AddAuthorization<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S> Service<Request<ReqBody>> for AddRequiredRequestHeaders<S>
where ReqBody: Send + 'static, ResBody: Send + 'static, S: Service<Request<ReqBody>, Response = Response<ResBody>>, <S as Service<Request<ReqBody>>>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<AddRequiredRequestHeaders<S> as Service<Request<ReqBody>>>::Response, <AddRequiredRequestHeaders<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S> Service<Request<ReqBody>> for AddRequiredResponseHeaders<S>
where ReqBody: Send + 'static, ResBody: Send + 'static, S: Service<Request<ReqBody>, Response = Response<ResBody>>,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<AddRequiredResponseHeaders<S> as Service<Request<ReqBody>>>::Response, <AddRequiredResponseHeaders<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody> Service<Request<ReqBody>> for BodyLimitService<S>
where S: Service<Request>, ReqBody: Body<Data = Bytes> + Send + Sync + 'static, <ReqBody as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = <S as Service<Request>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<BodyLimitService<S> as Service<Request<ReqBody>>>::Response, <BodyLimitService<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, T, ReqBody, ResBody> Service<Request<ReqBody>> for CatchPanic<S, T>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ResBody: Into<Body> + Send + 'static, T: ResponseForPanic + Clone + Send + Sync + 'static, ReqBody: Send + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<CatchPanic<S, T> as Service<Request<ReqBody>>>::Response, <CatchPanic<S, T> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for CollectBody<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, <S as Service<Request<ReqBody>>>::Error: Into<Box<dyn Error + Sync + Send>>, ReqBody: Send + 'static, ResBody: Body + Send + Sync + 'static, <ResBody as Body>::Data: Send, <ResBody as Body>::Error: Error + Send + Sync + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<CollectBody<S> as Service<Request<ReqBody>>>::Response, <CollectBody<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S> Service<Request<ReqBody>> for CompressAdaptService<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ResBody: Body + Send + 'static, <ResBody as Body>::Data: Send + 'static, <ResBody as Body>::Error: Into<Box<dyn Error + Sync + Send>> + Send + Sync + 'static, ReqBody: Send + 'static,

§

type Response = Response<CompressionBody<DecompressionBody<ResBody>>>

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<CompressAdaptService<S> as Service<Request<ReqBody>>>::Response, <CompressAdaptService<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S, P> Service<Request<ReqBody>> for Compression<S, P>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ResBody: Body + Send + 'static, <ResBody as Body>::Data: Send + 'static, <ResBody as Body>::Error: Send + 'static, P: Predicate + Send + Sync + 'static, ReqBody: Send + 'static,

§

type Response = Response<CompressionBody<ResBody>>

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<Compression<S, P> as Service<Request<ReqBody>>>::Response, <Compression<S, P> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for Cors<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Default + Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<Cors<S> as Service<Request<ReqBody>>>::Response, <Cors<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for Decompression<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Body + Send + 'static, <ResBody as Body>::Data: Send + 'static, <ResBody as Body>::Error: Send + 'static,

§

type Response = Response<DecompressionBody<ResBody>>

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<Decompression<S> as Service<Request<ReqBody>>>::Response, <Decompression<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody> Service<Request<ReqBody>> for DefaultServeDirFallback
where ReqBody: Send + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, _ctx: Context, _req: Request<ReqBody>, ) -> Result<<DefaultServeDirFallback as Service<Request<ReqBody>>>::Response, <DefaultServeDirFallback as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S, P> Service<Request<ReqBody>> for FollowRedirect<S, P>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Body + Default + Send + 'static, ResBody: Send + 'static, P: Policy<ReqBody, <S as Service<Request<ReqBody>>>::Error> + Clone,

§

type Response = Response<ResBody>

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> impl Future<Output = Result<<FollowRedirect<S, P> as Service<Request<ReqBody>>>::Response, <FollowRedirect<S, P> as Service<Request<ReqBody>>>::Error>>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<R, S, W, ReqBody, ResBody> Service<Request<ReqBody>> for HARExportService<R, S, W>
where R: Recorder, S: Service<Request, Response = Response<ResBody>>, <S as Service<Request>>::Error: Into<Box<dyn Error + Sync + Send>> + Send + Sync + 'static, W: Toggle, ReqBody: Body<Data = Bytes> + Send + Sync + 'static, <ReqBody as Body>::Error: Into<Box<dyn Error + Sync + Send>>, ResBody: Body<Data = Bytes> + Send + Sync + 'static, <ResBody as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<HARExportService<R, S, W> as Service<Request<ReqBody>>>::Response, <HARExportService<R, S, W> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody> Service<Request<ReqBody>> for HttpVersionAdapter
where ReqBody: Send + 'static,

§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

type Response = (Context, Request<ReqBody>)

The type of response returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<HttpVersionAdapter as Service<Request<ReqBody>>>::Response, <HttpVersionAdapter as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody> Service<Request<ReqBody>> for HttpsAlpnModifier
where ReqBody: Send + 'static,

§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

type Response = (Context, Request<ReqBody>)

The type of response returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<HttpsAlpnModifier as Service<Request<ReqBody>>>::Response, <HttpsAlpnModifier as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<F, S, ReqBody, ResBody, NewReqBody> Service<Request<ReqBody>> for MapRequestBody<S, F>
where S: Service<Request<NewReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, NewReqBody: Send + 'static, ResBody: Send + Sync + 'static, F: Fn(ReqBody) -> NewReqBody + Send + Sync + 'static,

§

type Response = <S as Service<Request<NewReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<NewReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<MapRequestBody<S, F> as Service<Request<ReqBody>>>::Response, <MapRequestBody<S, F> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<F, S, ReqBody, ResBody, NewResBody> Service<Request<ReqBody>> for MapResponseBody<S, F>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + Sync + 'static, NewResBody: Send + Sync + 'static, F: Fn(ResBody) -> NewResBody + Clone + Send + Sync + 'static,

§

type Response = Response<NewResBody>

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<MapResponseBody<S, F> as Service<Request<ReqBody>>>::Response, <MapResponseBody<S, F> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for NormalizePath<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> impl Future<Output = Result<<NormalizePath<S> as Service<Request<ReqBody>>>::Response, <NormalizePath<S> as Service<Request<ReqBody>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S> Service<Request<ReqBody>> for PropagateHeader<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<PropagateHeader<S> as Service<Request<ReqBody>>>::Response, <PropagateHeader<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for PropagateRequestId<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<PropagateRequestId<S> as Service<Request<ReqBody>>>::Response, <PropagateRequestId<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<A, C, L, S, ReqBody, ResBody> Service<Request<ReqBody>> for ProxyAuthService<A, C, S, L>
where A: Authority<C, L>, C: Credentials + Clone + Send + Sync + 'static, S: Service<Request<ReqBody>, Response = Response<ResBody>>, L: 'static, ReqBody: Send + 'static, ResBody: Default + Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<ProxyAuthService<A, C, S, L> as Service<Request<ReqBody>>>::Response, <ProxyAuthService<A, C, S, L> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S> Service<Request<ReqBody>> for RemoveRequestHeader<S>
where ReqBody: Send + 'static, ResBody: Send + 'static, S: Service<Request<ReqBody>, Response = Response<ResBody>>,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> impl Future<Output = Result<<RemoveRequestHeader<S> as Service<Request<ReqBody>>>::Response, <RemoveRequestHeader<S> as Service<Request<ReqBody>>>::Error>> + Send

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S> Service<Request<ReqBody>> for RemoveResponseHeader<S>
where ReqBody: Send + 'static, ResBody: Send + 'static, S: Service<Request<ReqBody>, Response = Response<ResBody>>,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<RemoveResponseHeader<S> as Service<Request<ReqBody>>>::Response, <RemoveResponseHeader<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody> Service<Request<ReqBody>> for RequestBodyTimeout<S>
where S: Service<Request<TimeoutBody<ReqBody>>>, ReqBody: Send + 'static,

§

type Response = <S as Service<Request<TimeoutBody<ReqBody>>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<TimeoutBody<ReqBody>>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<RequestBodyTimeout<S> as Service<Request<ReqBody>>>::Response, <RequestBodyTimeout<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody, D> Service<Request<ReqBody>> for RequestDecompression<S>
where S: Service<Request<DecompressionBody<ReqBody>>, Response = Response<ResBody>>, <S as Service<Request<DecompressionBody<ReqBody>>>>::Error: Into<Box<dyn Error + Sync + Send>>, ReqBody: Body + Send + 'static, ResBody: Body<Data = D> + Send + 'static, <ResBody as Body>::Error: Into<Box<dyn Error + Sync + Send>>, D: Buf + 'static,

§

type Response = Response<UnsyncBoxBody<D, Box<dyn Error + Sync + Send>>>

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<RequestDecompression<S> as Service<Request<ReqBody>>>::Response, <RequestDecompression<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<W, ReqBody> Service<Request<ReqBody>> for RequestWriterInspector<W>
where W: RequestWriter, ReqBody: Body<Data = Bytes> + Send + Sync + 'static, <ReqBody as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

type Response = (Context, Request)

The type of response returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<(Context, Request), <RequestWriterInspector<W> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for ResponseBodyTimeout<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Default + Send + 'static,

§

type Response = Response<TimeoutBody<ResBody>>

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<ResponseBodyTimeout<S> as Service<Request<ReqBody>>>::Response, <ResponseBodyTimeout<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, W, ReqBody, ResBody> Service<Request<ReqBody>> for ResponseWriterService<S, W>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, <S as Service<Request<ReqBody>>>::Error: Into<Box<dyn Error + Sync + Send>>, W: ResponseWriter, ReqBody: Send + 'static, ResBody: Body<Data = Bytes> + Send + Sync + 'static, <ResBody as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = Response

The type of response returned by the service.
§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<ResponseWriterService<S, W> as Service<Request<ReqBody>>>::Response, <ResponseWriterService<S, W> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, F, FResBody> Service<Request<ReqBody>> for ServeDir<F>
where ReqBody: Send + 'static, F: Service<Request<ReqBody>, Response = Response<FResBody>, Error = Infallible> + Clone, FResBody: Body<Data = Bytes> + Send + Sync + 'static, <FResBody as Body>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type Response = Response

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<ServeDir<F> as Service<Request<ReqBody>>>::Response, <ServeDir<F> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody> Service<Request<ReqBody>> for ServeFile
where ReqBody: Send + 'static,

§

type Error = <ServeDir as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

type Response = <ServeDir as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<ServeFile as Service<Request<ReqBody>>>::Response, <ServeFile as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S, M> Service<Request<ReqBody>> for SetRequestHeader<S, M>
where ReqBody: Send + 'static, ResBody: Send + 'static, S: Service<Request<ReqBody>, Response = Response<ResBody>>, M: MakeHeaderValue<ReqBody>,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<SetRequestHeader<S, M> as Service<Request<ReqBody>>>::Response, <SetRequestHeader<S, M> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, M, ReqBody, ResBody> Service<Request<ReqBody>> for SetRequestId<S, M>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, M: MakeRequestId, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<SetRequestId<S, M> as Service<Request<ReqBody>>>::Response, <SetRequestId<S, M> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S, M> Service<Request<ReqBody>> for SetResponseHeader<S, M>
where ReqBody: Send + 'static, ResBody: Send + 'static, S: Service<Request<ReqBody>, Response = Response<ResBody>>, M: MakeHeaderValueFactory<ReqBody, ResBody>,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<SetResponseHeader<S, M> as Service<Request<ReqBody>>>::Response, <SetResponseHeader<S, M> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S> Service<Request<ReqBody>> for SetSensitiveRequestHeaders<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<SetSensitiveRequestHeaders<S> as Service<Request<ReqBody>>>::Response, <SetSensitiveRequestHeaders<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S> Service<Request<ReqBody>> for SetSensitiveResponseHeaders<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<SetSensitiveResponseHeaders<S> as Service<Request<ReqBody>>>::Response, <SetSensitiveResponseHeaders<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for SetStatus<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<SetStatus<S> as Service<Request<ReqBody>>>::Response, <SetStatus<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody> Service<Request<ReqBody>> for Timeout<S>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Default + Send + 'static,

§

type Response = <S as Service<Request<ReqBody>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<Timeout<S> as Service<Request<ReqBody>>>::Response, <Timeout<S> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, ReqBody, ResBody, M, OnRequestT, OnResponseT, OnFailureT, OnBodyChunkT, OnEosT, MakeSpanT> Service<Request<ReqBody>> for Trace<S, M, MakeSpanT, OnRequestT, OnResponseT, OnBodyChunkT, OnEosT, OnFailureT>
where S: Service<Request<ReqBody>, Response = Response<ResBody>>, <S as Service<Request<ReqBody>>>::Error: Display, ReqBody: Body + Send + 'static, ResBody: Body + Send + Sync + 'static, <ResBody as Body>::Error: Display, M: MakeClassifier, <M as MakeClassifier>::Classifier: Clone, MakeSpanT: MakeSpan<ReqBody>, OnRequestT: OnRequest<ReqBody>, OnResponseT: OnResponse<ResBody> + Clone, OnBodyChunkT: OnBodyChunk<<ResBody as Body>::Data> + Clone, OnEosT: OnEos + Clone, OnFailureT: OnFailure<<M as MakeClassifier>::FailureClass> + Clone,

§

type Response = Response<ResponseBody<ResBody, <M as MakeClassifier>::ClassifyEos, OnBodyChunkT, OnEosT, OnFailureT>>

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<Trace<S, M, MakeSpanT, OnRequestT, OnResponseT, OnBodyChunkT, OnEosT, OnFailureT> as Service<Request<ReqBody>>>::Response, <Trace<S, M, MakeSpanT, OnRequestT, OnResponseT, OnBodyChunkT, OnEosT, OnFailureT> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody> Service<Request<ReqBody>> for UserAgentEmulateHttpConnectModifier
where ReqBody: Send + 'static,

§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

type Response = (Context, Request<ReqBody>)

The type of response returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<UserAgentEmulateHttpConnectModifier as Service<Request<ReqBody>>>::Response, <UserAgentEmulateHttpConnectModifier as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody> Service<Request<ReqBody>> for UserAgentEmulateHttpRequestModifier
where ReqBody: Send + 'static,

§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
§

type Response = (Context, Request<ReqBody>)

The type of response returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<UserAgentEmulateHttpRequestModifier as Service<Request<ReqBody>>>::Response, <UserAgentEmulateHttpRequestModifier as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S, V> Service<Request<ReqBody>> for ValidateRequestHeader<S, V>
where ReqBody: Send + 'static, ResBody: Send + 'static, V: ValidateRequest<ReqBody, ResponseBody = ResBody>, S: Service<Request<ReqBody>, Response = Response<ResBody>>,

§

type Response = Response<ResBody>

The type of response returned by the service.
§

type Error = <S as Service<Request<ReqBody>>>::Error

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request<ReqBody>, ) -> Result<<ValidateRequestHeader<S, V> as Service<Request<ReqBody>>>::Response, <ValidateRequestHeader<S, V> as Service<Request<ReqBody>>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
Source§

impl Service<Request> for EchoService

Source§

type Response = Response

The type of response returned by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
Source§

async fn serve( &self, ctx: Context, req: Request, ) -> Result<Self::Response, Self::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
Source§

impl Service<Request> for HttpEchoService

Source§

type Response = Response

The type of response returned by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

The type of error returned by the service.
Source§

async fn serve( &self, ctx: Context, _req: Request, ) -> Result<Self::Response, Self::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl Service<Request> for Router

§

type Response = Response

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request, ) -> Result<<Router as Service<Request>>::Response, <Router as Service<Request>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<R> Service<Request> for StaticService<R>
where R: IntoResponse + Clone + Send + Sync + 'static,

§

type Response = Response

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, _: Context, _: Request, ) -> Result<<StaticService<R> as Service<Request>>::Response, <StaticService<R> as Service<Request>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<S, O, E> Service<Request> for UpgradeService<S, O>
where S: Service<Request, Response = O, Error = E>, O: Send + Sync + 'static, E: Send + Sync + 'static,

§

type Response = O

The type of response returned by the service.
§

type Error = E

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request, ) -> Result<<UpgradeService<S, O> as Service<Request>>::Response, <UpgradeService<S, O> as Service<Request>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl Service<Request> for WebService

§

type Response = Response

The type of response returned by the service.
§

type Error = Infallible

The type of error returned by the service.
§

async fn serve( &self, ctx: Context, req: Request, ) -> Result<<WebService as Service<Request>>::Response, <WebService as Service<Request>>::Error>

Serve a response or error for the given request, using the given context.
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

impl<B> Body for Request<B>
where B: Body,

§

type Data = <B as Body>::Data

Values yielded by the Body.
§

type Error = <B as Body>::Error

The error type this Body might generate.
§

fn poll_frame( self: Pin<&mut Request<B>>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Frame<<Request<B> as Body>::Data>, <Request<B> as Body>::Error>>>

Attempt to pull out the next data buffer of this stream.
§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
§

impl TryFrom<Request> for Request

§

type Error = OpaqueError

The type returned in the event of a conversion error.
§

fn try_from( har_request: Request, ) -> Result<Request, <Request as TryFrom<Request>>::Error>

Performs the conversion.
§

impl<Body> TryRefIntoTransportContext for Request<Body>

§

type Error = OpaqueError

The error that can happen when trying to turn the self reference into the TransportContext.
§

fn try_ref_into_transport_ctx( &self, ctx: &Context, ) -> Result<TransportContext, <Request<Body> as TryRefIntoTransportContext>::Error>

Try to turn the reference to self within the given context into the TransportContext.

Auto Trait Implementations§

§

impl<T = Body> !Freeze for Request<T>

§

impl<T = Body> !RefUnwindSafe for Request<T>

§

impl<T> Send for Request<T>
where T: Send,

§

impl<T> Sync for Request<T>
where T: Sync,

§

impl<T> Unpin for Request<T>
where T: Unpin,

§

impl<T = Body> !UnwindSafe for Request<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

§

impl<T> BodyExt for T
where T: Body + ?Sized,

§

fn frame(&mut self) -> Frame<'_, Self>
where Self: Unpin,

Returns a future that resolves to the next Frame, if any.
§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where Self: Sized, F: FnMut(Frame<Self::Data>) -> Frame<B>, B: Buf,

Maps this body’s frame to a different kind.
§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where Self: Sized, F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
§

fn collect(self) -> Collect<Self>
where Self: Sized,

Turn this body into Collected body which will collect all the DATA frames and trailers.
§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where Self: Sized, F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
§

fn into_data_stream(self) -> BodyDataStream<Self>
where Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
§

impl<T, U> RamaInto<U> for T
where U: RamaFrom<T>,

§

fn rama_into(self) -> U

§

impl<T, U> RamaInto<U> for T
where U: RamaFrom<T>,

§

fn rama_into(self) -> U

§

impl<T, U> RamaTryInto<U> for T
where U: RamaTryFrom<T>,

§

type Error = <U as RamaTryFrom<T>>::Error

§

fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T>>::Error>

§

impl<T, U> RamaTryInto<U> for T
where U: RamaTryFrom<T>,

§

type Error = <U as RamaTryFrom<T>>::Error

§

fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T>>::Error>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,