Skip to main content

Connector

Trait Connector 

Source
pub trait Connector: Send + Sync {
    // Required methods
    fn capability(&self) -> &'static str;
    fn dispatch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        call: &'life1 HostCallPayload,
    ) -> Pin<Box<dyn Future<Output = Result<HostResultPayload>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for connectors that handle hostcalls from extensions.

Required Methods§

Source

fn capability(&self) -> &'static str

The capability name this connector handles (e.g., “http”, “fs”).

Source

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

Dispatch a hostcall to this connector.

Returns HostResultPayload with either success output or error details.

Implementors§