Skip to main content

RequestServiceHandle

Trait RequestServiceHandle 

pub trait RequestServiceHandle {
    type Body;
    type Svc: Service<Request, Output = Response<Self::Body>>
       where <Self::Svc as Service<Request>>::Error: Into<Box<dyn Error + Send + Sync>>;

    // Required method
    fn svc_ref(&self) -> &Self::Svc;
}
Expand description

Internal trait that is implemented for all S variants of RequestBuilder.

You never need to implement this trait yourself, but you might need to trait bound it, if you have generic code over a RequestBuilder.

Required Associated Types§

type Body

type Svc: Service<Request, Output = Response<Self::Body>> where <Self::Svc as Service<Request>>::Error: Into<Box<dyn Error + Send + Sync>>

Required Methods§

fn svc_ref(&self) -> &Self::Svc

Implementors§

§

impl<'a, S, Body> RequestServiceHandle for RQBorrowedService<'a, S>
where S: Service<Request, Output = Response<Body>>, <S as Service<Request>>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Body = Body

§

type Svc = S

§

impl<S, Body> RequestServiceHandle for RQOwnedService<S>
where S: Service<Request, Output = Response<Body>>, <S as Service<Request>>::Error: Into<Box<dyn Error + Send + Sync>>,

§

type Body = Body

§

type Svc = S