Skip to main content

SessionStateService

Trait SessionStateService 

Source
pub trait SessionStateService: Send + Sync {
    // Provided methods
    fn snapshot_current<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<SessionSnapshot, PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn snapshot_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<SessionSnapshot, PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn tool_catalog<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Value>, PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn shared_tool_catalog<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<Vec<Value>>, PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn tool_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ToolState, PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn apply_tool_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _session_id: &'life1 str,
        _snapshot: ToolState,
    ) -> Pin<Box<dyn Future<Output = Result<u64, PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn set_tool_membership<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        tool_names: &'life2 [String],
        present: bool,
    ) -> Pin<Box<dyn Future<Output = Result<u64, PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}

Provided Methods§

Source

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

Source

fn snapshot_session<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<SessionSnapshot, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn tool_catalog<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Value>, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn shared_tool_catalog<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<Vec<Value>>, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn tool_state<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ToolState, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn apply_tool_state<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 str, _snapshot: ToolState, ) -> Pin<Box<dyn Future<Output = Result<u64, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn set_tool_membership<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 str, tool_names: &'life2 [String], present: bool, ) -> Pin<Box<dyn Future<Output = Result<u64, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Toggle Tool Catalog membership for several tools at once. present adds the tools as members; !present removes them (non-membership) while keeping their state for later re-add.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§