pub trait MicroserviceClient:
Send
+ Sync
+ 'static {
// Required methods
fn send<Payload, Response>(
&self,
pattern: impl Into<String>,
payload: Payload,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send>>
where Payload: Serialize + Send + 'static,
Response: DeserializeOwned + Send + 'static;
fn emit<Payload>(
&self,
pattern: impl Into<String>,
payload: Payload,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send>>
where Payload: Serialize + Send + 'static;
}Required Methods§
fn send<Payload, Response>( &self, pattern: impl Into<String>, payload: Payload, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send>>
fn emit<Payload>( &self, pattern: impl Into<String>, payload: Payload, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send>>
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.