pub trait ToolOutput {
// Required method
fn to_prompt_text(&self) -> String;
}Expand description
The model-facing rendering of a tool’s output.
A tool result has two faces (ADR-0003): the structured Tool::Output value
goes into the report’s tool_calls[], while to_prompt_text() renders the
text the model sees in history. They are independent renderings of one call —
e.g. a read tool reports {path, lines, truncated} but shows the file body.
Required Methods§
Sourcefn to_prompt_text(&self) -> String
fn to_prompt_text(&self) -> String
Render this output as the text the model reads back in the transcript.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".