pub trait AgentExecutor:
Send
+ Sync
+ 'static {
// Required method
fn execute_query<'life0, 'async_trait>(
&'life0 self,
message: String,
session_id: String,
state: AppState,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for agent execution – injected into AppState for testability.
Required Methods§
Sourcefn execute_query<'life0, 'async_trait>(
&'life0 self,
message: String,
session_id: String,
state: AppState,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_query<'life0, 'async_trait>(
&'life0 self,
message: String,
session_id: String,
state: AppState,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a query for a given session. Called as a background task.