pub trait SendService<Request>: Sealed<Request> {
    type Service: Service<Request, Response = Response<Self::Body>, Error = Self::Error, Future = Self::Future> + Send + Clone + 'static;
    type Body: Body<Data = Self::BodyData, Error = Self::BodyError> + Send + 'static;
    type BodyData: Send + 'static;
    type BodyError: Into<Box<dyn Error + Send + Sync>>;
    type Error: Into<Box<dyn Error + Send + Sync>>;
    type Future: Future<Output = Result<Response<Self::Body>, Self::Error>> + Send + 'static;

    // Required method
    fn into_service(self) -> Self::Service;
}
Expand description

Trait alias for Service with bounds required for serve.

This trait is sealed and cannot be implemented for types outside this crate.

Required Associated Types§

source

type Service: Service<Request, Response = Response<Self::Body>, Error = Self::Error, Future = Self::Future> + Send + Clone + 'static

source

type Body: Body<Data = Self::BodyData, Error = Self::BodyError> + Send + 'static

source

type BodyData: Send + 'static

source

type BodyError: Into<Box<dyn Error + Send + Sync>>

source

type Error: Into<Box<dyn Error + Send + Sync>>

source

type Future: Future<Output = Result<Response<Self::Body>, Self::Error>> + Send + 'static

Required Methods§

source

fn into_service(self) -> Self::Service

Implementors§

source§

impl<T, B, Request> SendService<Request> for T
where T: Service<Request, Response = Response<B>> + Send + Clone + 'static, T::Error: Into<Box<dyn Error + Send + Sync>>, T::Future: Send + 'static, B: Body + Send + 'static, B::Data: Send + 'static, B::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Service = T

§

type Body = B

§

type BodyData = <B as Body>::Data

§

type BodyError = <B as Body>::Error

§

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

§

type Future = <T as Service<Request>>::Future