Skip to main content

UserToolHandlerFactory

Trait UserToolHandlerFactory 

Source
pub trait UserToolHandlerFactory:
    Send
    + Sync
    + Debug {
    // Required method
    fn create(
        &self,
        nats: Client,
        js: Context,
        session_id: String,
        agent_id: String,
        budget_remaining_secs: f64,
        subject_prefix: String,
    ) -> Arc<dyn UserToolHandlerTrait> ;
}
Expand description

Factory for creating per-task user tool handlers.

The reference implementation NatsUserToolHandlerFactory wraps UserToolHandler, which depends on NATS internals.

Required Methods§

Source

fn create( &self, nats: Client, js: Context, session_id: String, agent_id: String, budget_remaining_secs: f64, subject_prefix: String, ) -> Arc<dyn UserToolHandlerTrait>

Create a handler scoped to a specific task execution.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§