wasmcloud_interface_polling

Trait PollSubscriber

Source
pub trait PollSubscriber {
    // Required method
    fn poll_rx<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context,
        arg: &'life2 PollResult,
    ) -> 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 PollSubscriber interface described an actor interface that receives the results from automatic polling of external services/hardware at a specified interval. wasmbus.contractId: wasmcloud:polling wasmbus.actorReceive

Required Methods§

Source

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

Receive results from the latest automatic poll, or simply perform some functionality without any external input

Provided Methods§

Source

fn contract_id() -> &'static str

returns the capability contract id for this interface

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§