pub trait Service<Req = ()> {
type Response;
type Error;
// Required method
fn call(
&self,
req: Req
) -> impl Future<Output = Result<Self::Response, Self::Error>>;
}Expand description
Trait for simulate Fn<(&Self, Arg)> -> impl Future<Output = Result<T, E>> + '_.
The function call come from stateful type that can be referenced within returned opaque future.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.