Trait ServiceObject

Source
pub trait ServiceObject<Req> {
    type Response;
    type Error;

    // Required method
    fn call<'s>(
        &'s self,
        req: Req,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + 's>>
       where Req: 's;
}
Expand description

Object-safe counterpart of Service.

Required Associated Types§

Required Methods§

Source

fn call<'s>( &'s self, req: Req, ) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + 's>>
where Req: 's,

Implementors§

Source§

impl<S, Req> ServiceObject<Req> for S
where S: Service<Req>,

Source§

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

Source§

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