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§
Sourcefn capability(&self) -> &'static str
fn capability(&self) -> &'static str
The capability name this connector handles (e.g., “http”, “fs”).
Sourcefn 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,
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.