Skip to main content

SubagentConnector

Trait SubagentConnector 

Source
pub trait SubagentConnector {
    type Error: Into<Error>;

    // Required methods
    async fn push_chunk(&self, chunk: StreamingChunk);
    fn tool_call(
        &self,
        agent: &Agent,
        call: &ToolCall,
    ) -> Result<(), Self::Error>;
    fn tool_result(
        &self,
        agent: &Agent,
        call: &ToolCall,
        result: &Result<String, Error>,
    ) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

async fn push_chunk(&self, chunk: StreamingChunk)

Source

fn tool_call(&self, agent: &Agent, call: &ToolCall) -> Result<(), Self::Error>

Source

fn tool_result( &self, agent: &Agent, call: &ToolCall, result: &Result<String, Error>, ) -> Result<(), Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§