Skip to main content

RpcDispatcher

Trait RpcDispatcher 

Source
pub trait RpcDispatcher: Send + Sync {
    // Required method
    fn dispatch<'a>(
        &'a self,
        req: RpcRequest,
    ) -> Pin<Box<dyn Future<Output = RpcResponse> + Send + 'a>>;
}
Expand description

Trait-object handle for dispatching Python RPCs back into Rust.

Each RLM turn supplies one. Implementations forward to the LLM client (and recursively into run_rlm_turn_inner for Rlm / RlmBatch).

Required Methods§

Source

fn dispatch<'a>( &'a self, req: RpcRequest, ) -> Pin<Box<dyn Future<Output = RpcResponse> + Send + 'a>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§