pub trait Service<Request>:
Sized
+ Send
+ Sync
+ 'static {
type Response: Send + 'static;
type Error: Send + Sync + 'static;
// Required method
fn call(
&self,
request: Request,
) -> impl Future<Output = Result<Self::Response, Self::Error>> + Send + '_;
// Provided method
fn boxed(self) -> BoxService<Request, Self::Response, Self::Error> { ... }
}
Required Associated Types§
Required Methods§
Provided Methods§
sourcefn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
Box this service to allow for dynamic dispatch.
Object Safety§
This trait is not object safe.