Skip to main content

AgentBackendSession

Trait AgentBackendSession 

Source
pub trait AgentBackendSession: Send {
    // Required methods
    fn thread_id(&self) -> &str;
    fn model(&self) -> &str;
    fn reasoning(&self) -> &str;
    fn snapshot(&self) -> BackendThreadSnapshot;
    fn send<'life0, 'async_trait>(
        &'life0 mut self,
        text: String,
        policy_mode: Option<PolicyMode>,
        model: Option<String>,
        reasoning: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn interrupt<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn archive<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn approve<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        request_id: &'life1 str,
        approved: bool,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn answer<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        request_id: &'life1 str,
        answers: Vec<(String, String)>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn next_event<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<BackendEvent>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn thread_id(&self) -> &str

Source

fn model(&self) -> &str

Source

fn reasoning(&self) -> &str

Source

fn snapshot(&self) -> BackendThreadSnapshot

Source

fn send<'life0, 'async_trait>( &'life0 mut self, text: String, policy_mode: Option<PolicyMode>, model: Option<String>, reasoning: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

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

Source

fn approve<'life0, 'life1, 'async_trait>( &'life0 mut self, request_id: &'life1 str, approved: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn answer<'life0, 'life1, 'async_trait>( &'life0 mut self, request_id: &'life1 str, answers: Vec<(String, String)>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§