pub trait Service<Request>: Send + Sync {
type Response;
type Error;
// Required method
fn call(
&self,
req: Request,
ip_addr: Option<IpAddr>,
) -> impl Future<Output = Result<Self::Response, Self::Error>>;
}Required Associated Types§
Required Methods§
fn call( &self, req: Request, ip_addr: Option<IpAddr>, ) -> impl Future<Output = Result<Self::Response, Self::Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.