pub trait MessageSubscriber {
    // Required method
    fn handle_message<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context,
        arg: &'life2 SubMessage
    ) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn contract_id() -> &'static str { ... }
}
Expand description

The MessageSubscriber interface describes an actor interface that receives messages sent by the Messaging provider wasmbus.contractId: wasmcloud:messaging wasmbus.actorReceive

Required Methods§

source

fn handle_message<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context, arg: &'life2 SubMessage ) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

subscription handler

Provided Methods§

source

fn contract_id() -> &'static str

returns the capability contract id for this interface

Implementors§