pub trait BoxCodec {
type Box: Clone;
// Required methods
fn tool_call_box(&mut self, call: &ToolCall) -> Self::Box;
fn box_text<'a>(&self, box_: &'a Self::Box) -> &'a str;
}Expand description
Converts between a chat engine’s canonical box type and text visible to Codex.
A shim calls tool_call_box exactly once for each dynamic tool call it
receives. box_text must return the complete representation that should be
placed into Codex context. Implementations must not add ordering of their
own: the shim preserves insertion order.
Required Associated Types§
Required Methods§
Sourcefn tool_call_box(&mut self, call: &ToolCall) -> Self::Box
fn tool_call_box(&mut self, call: &ToolCall) -> Self::Box
Converts one typed Codex dynamic-tool request into a canonical box.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".