Struct rama::http::dep::http::Request

pub struct Request<T> { /* 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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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 Uri: TryFrom<T>, <Uri as TryFrom<T>>::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<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<Body> BodyExtractExt for Request<Body>
where Body: Body + Send + 'static, <Body as Body>::Data: Send + 'static, <Body as Body>::Error: Into<Box<dyn Error + Send + Sync>>,

§

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 copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
§

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 FromRequest for Request<Body>

§

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<Body>, ) -> Result<Request<Body>, <Request<Body> 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<State, Body> Matcher<State, Request<Body>> for DomainMatcher

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise

§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise Read more
§

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

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

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

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

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

Negate the current condition.
§

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

§

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

returns true on a match, false otherwise

§

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

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

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

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

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

Negate the current condition.
source§

impl Service<(), Request<Body>> for EchoService

§

type Response = Response<Body>

The type of response returned by the service.
§

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

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<S, Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
source§

impl Service<(), Request<Body>> for HttpEchoService

§

type Response = Response<Body>

The type of response returned by the service.
§

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

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<S, Request, Self::Response, Self::Error>

Box this service to allow for dynamic dispatch.
§

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

§

type Response = <S as Service<State, 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<State>, request: Request<Body>, ) -> Result<<DnsResolveModeService<S> as Service<State, Request<Body>>>::Response, <DnsResolveModeService<S> as Service<State, Request<Body>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<Body>

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<State>, req: Request<Body>, ) -> Result<<ErrorHandler<S> as Service<State, Request<Body>>>::Response, <ErrorHandler<S> as Service<State, Request<Body>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<Body>

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<State>, req: Request<Body>, ) -> Result<<ErrorHandler<S, F> as Service<State, Request<Body>>>::Response, <ErrorHandler<S, F> as Service<State, Request<Body>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, S, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, S, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, S, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, S, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, S, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, T8, S, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, S, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

fn boxed(self) -> BoxService<S, 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, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

fn boxed(self) -> BoxService<S, 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, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

fn boxed(self) -> BoxService<S, 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, State, Body> Service<State, 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<State, Request<Body>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<State, Body> Service<State, Request<Body>> for HttpClient
where State: Clone + Send + Sync + 'static, Body: Body + Unpin + Send + 'static, <Body as Body>::Data: Send + 'static, <Body as Body>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Response = Response<Body>

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<State>, req: Request<Body>, ) -> Result<<HttpClient as Service<State, Request<Body>>>::Response, <HttpClient as Service<State, Request<Body>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

impl<State, Body> Service<State, Request<Body>> for HttpClientService<Body>
where State: Clone + Send + Sync + 'static, Body: Body + Unpin + Send + 'static, <Body as Body>::Data: Send + 'static, <Body as Body>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Response = Response<Body>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, State, Body> Service<State, Request<Body>> for HttpConnector<S>
where S: ConnectorService<State, Request<Body>>, <S as ConnectorService<State, Request<Body>>>::Connection: Stream + Unpin, <S as ConnectorService<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, State: Clone + Send + Sync + 'static, Body: Body + Unpin + Send + 'static, <Body as Body>::Data: Send + 'static, <Body as Body>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Response = EstablishedClientConnection<HttpClientService<Body>, State, Request<Body>>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<State, Body, ResBody> Service<State, Request<Body>> for Redirect<ResBody>
where State: Clone + Send + Sync + 'static, 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<State>, _req: Request<Body>, ) -> Result<<Redirect<ResBody> as Service<State, Request<Body>>>::Response, <Redirect<ResBody> as Service<State, Request<Body>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, F, State, Body> Service<State, Request<Body>> for RequestMetricsService<S, F>
where S: Service<State, Request<Body>>, <S as Service<State, Request<Body>>>::Response: IntoResponse, F: AttributesFactory<State>, State: Clone + Send + Sync + 'static, Body: Send + 'static,

§

type Response = Response<Body>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = <S as Service<State, 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<State>, request: Request<Body>, ) -> Result<<Retry<P, S> as Service<State, Request<Body>>>::Response, <Retry<P, S> as Service<State, Request<Body>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, T8, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

fn boxed(self) -> BoxService<S, 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, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

fn boxed(self) -> BoxService<S, 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, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

fn boxed(self) -> BoxService<S, 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, State, Body> Service<State, 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<State, Request<Body>>, <S as Service<State, Request<Body>>>::Error: Into<Box<dyn Error + Send + Sync>>, Body: Send + 'static, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, State, O, E> Service<State, Request<Body>> for UpgradeService<S, State, O>
where State: Clone + Send + Sync + 'static, S: Service<State, Request<Body>, 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<State>, req: Request<Body>, ) -> Result<<UpgradeService<S, State, O> as Service<State, Request<Body>>>::Response, <UpgradeService<S, State, O> as Service<State, Request<Body>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, State, Body> Service<State, Request<Body>> for UserAgentClassifier<S>
where S: Service<State, Request<Body>>, State: Clone + Send + Sync + 'static,

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<State> Service<State, Request<Body>> for WebService<State>
where State: Clone + Send + Sync + 'static,

§

type Response = Response<Body>

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<State>, req: Request<Body>, ) -> Result<<WebService<State> as Service<State, Request<Body>>>::Response, <WebService<State> as Service<State, Request<Body>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S, State, Auth> Service<State, Request<ReqBody>> for AsyncRequireAuthorization<S, Auth>
where Auth: AsyncAuthorizeRequest<State, ReqBody, ResponseBody = ResBody> + Send + Sync + 'static, S: Service<State, Request<<Auth as AsyncAuthorizeRequest<State, ReqBody>>::RequestBody>, Response = Response<ResBody>>, ReqBody: Send + 'static, ResBody: Send + 'static, State: Clone + Send + Sync + 'static,

§

type Response = Response<ResBody>

The type of response returned by the service.
§

type Error = <S as Service<State, Request<<Auth as AsyncAuthorizeRequest<State, ReqBody>>::RequestBody>>>::Error

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, State, ReqBody> Service<State, Request<ReqBody>> for BodyLimitService<S>
where S: Service<State, Request<Limited<ReqBody>>>, State: Clone + Send + Sync + 'static, ReqBody: Send + 'static,

§

type Response = <S as Service<State, Request<Limited<ReqBody>>>>::Response

The type of response returned by the service.
§

type Error = <S as Service<State, Request<Limited<ReqBody>>>>::Error

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<Body>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<Body>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<ReqBody, ResBody, S, P, State> Service<State, Request<ReqBody>> for Compression<S, P>
where S: Service<State, 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, State: Clone + Send + Sync + 'static,

§

type Response = Response<CompressionBody<ResBody>>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, State, ReqBody, ResBody> Service<State, Request<ReqBody>> for Decompression<S>
where S: Service<State, Request<ReqBody>, Response = Response<ResBody>>, State: Clone + Send + Sync + 'static, 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<State, Request<ReqBody>>>::Error

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<Body>

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<State>, _req: Request<ReqBody>, ) -> Result<<DefaultServeDirFallback as Service<State, Request<ReqBody>>>::Response, <DefaultServeDirFallback as Service<State, Request<ReqBody>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<ResBody>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<F, S, State, ReqBody, ResBody, NewResBody> Service<State, Request<ReqBody>> for MapResponseBody<S, F>
where S: Service<State, Request<ReqBody>, Response = Response<ResBody>>, State: Clone + Send + Sync + 'static, 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<State, Request<ReqBody>>>::Error

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<ResBody>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<Body>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<Body>

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<State>, req: Request<ReqBody>, ) -> Result<<ServeDir<F> as Service<State, Request<ReqBody>>>::Response, <ServeDir<F> as Service<State, Request<ReqBody>>>::Error>

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of error returned by the service.
§

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

The type of response returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

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

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<S, State, ReqBody, ResBody, M, OnRequestT, OnResponseT, OnFailureT, OnBodyChunkT, OnEosT, MakeSpanT> Service<State, Request<ReqBody>> for Trace<S, M, MakeSpanT, OnRequestT, OnResponseT, OnBodyChunkT, OnEosT, OnFailureT>
where S: Service<State, Request<ReqBody>, Response = Response<ResBody>>, <S as Service<State, Request<ReqBody>>>::Error: Display, State: Clone + Send + Sync + 'static, 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<State, Request<ReqBody>>>::Error

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

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

§

type Response = Response<ResBody>

The type of response returned by the service.
§

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

The type of error returned by the service.
§

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

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

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

Box this service to allow for dynamic dispatch.
§

impl<State, Body> TryRefIntoTransportContext<State> 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<State>, ) -> Result<TransportContext, <Request<Body> as TryRefIntoTransportContext<State>>::Error>

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

Auto Trait Implementations§

§

impl<T> !Freeze for Request<T>

§

impl<T> !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> !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<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§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. 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> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

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

§

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

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

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

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

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

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

§

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
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

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

§

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>,

§

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