Skip to main content

InboundAdapter

Trait InboundAdapter 

Source
pub trait InboundAdapter: BaseAdapter {
    // Required method
    fn run<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Inbound adapter: receives external data/events and produces Exchanges routed inside Allora.

Implementations should:

  • Parse / normalize an external protocol entity into a Message (payload + headers).
  • Invoke crate::adapter::ensure_correlation before dispatch.
  • Dispatch the Exchange via a channel / route.
  • Manage lifecycle (bind ports, subscribe to topics, handle shutdown).

Required Methods§

Source

fn run<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run the adapter until stopped (lifecycle). Implementations define their own shutdown semantics.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§