Skip to main content

WebPluginAdapter

Trait WebPluginAdapter 

Source
pub trait WebPluginAdapter: Send + Sync {
    // Required methods
    fn take_streams<'a>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<WebRuntimeStreams, WebError>> + Send + 'a>>;
    fn thread_start<'a>(
        &'a self,
        params: ThreadStartParams,
    ) -> Pin<Box<dyn Future<Output = Result<String, WebError>> + Send + 'a>>;
    fn thread_resume<'a>(
        &'a self,
        thread_id: &'a str,
        params: ThreadStartParams,
    ) -> Pin<Box<dyn Future<Output = Result<String, WebError>> + Send + 'a>>;
    fn turn_start<'a>(
        &'a self,
        turn_params: Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value, WebError>> + Send + 'a>>;
    fn thread_archive<'a>(
        &'a self,
        thread_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<(), WebError>> + Send + 'a>>;
    fn respond_approval_ok<'a>(
        &'a self,
        approval_id: &'a str,
        result: Value,
    ) -> Pin<Box<dyn Future<Output = Result<(), WebError>> + Send + 'a>>;
    fn pending_approval_ids(&self) -> Vec<String>;

    // Provided method
    fn plugin_contract_version(&self) -> PluginContractVersion { ... }
}

Required Methods§

Source

fn take_streams<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<WebRuntimeStreams, WebError>> + Send + 'a>>

Source

fn thread_start<'a>( &'a self, params: ThreadStartParams, ) -> Pin<Box<dyn Future<Output = Result<String, WebError>> + Send + 'a>>

Source

fn thread_resume<'a>( &'a self, thread_id: &'a str, params: ThreadStartParams, ) -> Pin<Box<dyn Future<Output = Result<String, WebError>> + Send + 'a>>

Source

fn turn_start<'a>( &'a self, turn_params: Value, ) -> Pin<Box<dyn Future<Output = Result<Value, WebError>> + Send + 'a>>

Source

fn thread_archive<'a>( &'a self, thread_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), WebError>> + Send + 'a>>

Source

fn respond_approval_ok<'a>( &'a self, approval_id: &'a str, result: Value, ) -> Pin<Box<dyn Future<Output = Result<(), WebError>> + Send + 'a>>

Source

fn pending_approval_ids(&self) -> Vec<String>

Provided Methods§

Implementors§