Skip to main content

MicroserviceClient

Trait MicroserviceClient 

Source
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§

Source

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,

Source

fn emit<Payload>( &self, pattern: impl Into<String>, payload: Payload, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send>>
where Payload: Serialize + Send + 'static,

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.

Implementors§