pub struct ExecutionResult {
pub step_id: String,
pub parts: Vec<Part>,
pub status: ExecutionStatus,
pub reason: Option<String>,
pub timestamp: i64,
}Expand description
Execution result with detailed information
Fields§
§step_id: String§parts: Vec<Part>§status: ExecutionStatus§reason: Option<String>§timestamp: i64Implementations§
Source§impl ExecutionResult
impl ExecutionResult
Sourcepub const MAX_TOOL_RESULT_TOKENS: usize = 500
pub const MAX_TOOL_RESULT_TOKENS: usize = 500
Maximum tokens for a single tool result in the scratchpad.
pub fn is_success(&self) -> bool
pub fn is_failed(&self) -> bool
pub fn is_rejected(&self) -> bool
pub fn is_input_required(&self) -> bool
pub fn as_observation(&self) -> String
Sourcepub fn compact_for_history(&self) -> Self
pub fn compact_for_history(&self) -> Self
Compact execution results for the prompt history slice.
strip_inline_files = true replaces Image / File parts with text
placeholders — appropriate for entries that are NOT the latest tool
result, where we don’t want N copies of the same image fattening
every subsequent turn. strip_inline_files = false keeps the
inline bytes — appropriate at storage time and for the latest
tool result, so the very next planning turn can actually see the
image the tool just returned.
pub fn compact_for_history_with(&self, strip_inline_files: bool) -> Self
Sourcepub fn with_empty_guard(self) -> Self
pub fn with_empty_guard(self) -> Self
Ensure the result has at least one part. If empty, injects a “[No output]” guard.
Sourcepub fn compact_for_storage(&self) -> Self
pub fn compact_for_storage(&self) -> Self
Compact for storage. Truncates oversized text/JSON but keeps inline
images and files, so the very next planning turn can still see the
image a tool just returned. Display-time compaction
(compact_for_history, called by the formatter for non-latest
scratchpad entries) is what strips images from the rolling context.
Trait Implementations§
Source§impl Clone for ExecutionResult
impl Clone for ExecutionResult
Source§fn clone(&self) -> ExecutionResult
fn clone(&self) -> ExecutionResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionResult
impl Debug for ExecutionResult
Source§impl<'de> Deserialize<'de> for ExecutionResult
impl<'de> Deserialize<'de> for ExecutionResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ExecutionResult
impl JsonSchema for ExecutionResult
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more