pub trait ProxyHandler: Send + Sync {
// Required method
fn handle_command(
&self,
command: SdkCommand,
event_sink: &dyn Fn(ProxyEvent),
) -> SdkResponse;
}Expand description
Handler for incoming proxy commands.
Implementations receive a parsed SdkCommand and return an SdkResponse.
They can also emit ProxyEvents through the provided callback for async
event forwarding (e.g., streaming agent events).
Required Methods§
Sourcefn handle_command(
&self,
command: SdkCommand,
event_sink: &dyn Fn(ProxyEvent),
) -> SdkResponse
fn handle_command( &self, command: SdkCommand, event_sink: &dyn Fn(ProxyEvent), ) -> SdkResponse
Handle a single command. Use event_sink to emit async events.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".