wasmcloud_runtime::component

Trait Messaging0_2

source
pub trait Messaging0_2 {
    // Required methods
    fn request(
        &self,
        subject: String,
        body: Vec<u8>,
        timeout_ms: u32,
    ) -> impl Future<Output = Result<Result<BrokerMessage, String>>> + Send;
    fn publish(
        &self,
        msg: BrokerMessage,
    ) -> impl Future<Output = Result<Result<(), String>>> + Send;
}
Expand description

wasmcloud:messaging abstraction

Required Methods§

source

fn request( &self, subject: String, body: Vec<u8>, timeout_ms: u32, ) -> impl Future<Output = Result<Result<BrokerMessage, String>>> + Send

Handle wasmcloud:messaging/request

source

fn publish( &self, msg: BrokerMessage, ) -> impl Future<Output = Result<Result<(), String>>> + Send

Handle wasmcloud:messaging/publish

Object Safety§

This trait is not object safe.

Implementors§