Skip to main content

ThreadGoalController

Trait ThreadGoalController 

Source
pub trait ThreadGoalController:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_thread_goal<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread_id: &'life1 ThreadId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadGoal>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_thread_goal<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread_id: &'life1 ThreadId,
        objective: String,
        token_budget: Option<i64>,
    ) -> Pin<Box<dyn Future<Output = Result<ThreadGoal>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_thread_goal<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread_id: &'life1 ThreadId,
        patch: ThreadGoalPatch,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadGoal>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn clear_thread_goal<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread_id: &'life1 ThreadId,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn get_thread_goal<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 ThreadId, ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadGoal>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_thread_goal<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 ThreadId, objective: String, token_budget: Option<i64>, ) -> Pin<Box<dyn Future<Output = Result<ThreadGoal>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new active thread goal, replacing any existing goal for the thread.

Source

fn set_thread_goal<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 ThreadId, patch: ThreadGoalPatch, ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadGoal>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§