pub struct AgentCallbackResult {
pub success: bool,
pub duration: Duration,
pub output_preview: Option<String>,
pub error: Option<String>,
pub steps_executed: Option<u32>,
pub tool_calls: Option<u32>,
pub model_calls: Option<u32>,
}Expand description
Result information for agent completion callback
Fields§
§success: boolWhether the agent succeeded
duration: DurationDuration of agent execution
output_preview: Option<String>Output preview (truncated if needed)
error: Option<String>Error message if failed
steps_executed: Option<u32>Number of steps executed
tool_calls: Option<u32>Number of tool calls made
model_calls: Option<u32>Number of model calls made
Implementations§
Source§impl AgentCallbackResult
impl AgentCallbackResult
Sourcepub fn with_output_preview(self, output: impl Into<String>) -> Self
pub fn with_output_preview(self, output: impl Into<String>) -> Self
Add output preview
Sourcepub fn with_stats(self, steps: u32, tool_calls: u32, model_calls: u32) -> Self
pub fn with_stats(self, steps: u32, tool_calls: u32, model_calls: u32) -> Self
Add execution stats
Trait Implementations§
Source§impl Clone for AgentCallbackResult
impl Clone for AgentCallbackResult
Source§fn clone(&self) -> AgentCallbackResult
fn clone(&self) -> AgentCallbackResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentCallbackResult
impl Debug for AgentCallbackResult
Source§impl<'de> Deserialize<'de> for AgentCallbackResult
impl<'de> Deserialize<'de> for AgentCallbackResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentCallbackResult
impl RefUnwindSafe for AgentCallbackResult
impl Send for AgentCallbackResult
impl Sync for AgentCallbackResult
impl Unpin for AgentCallbackResult
impl UnsafeUnpin for AgentCallbackResult
impl UnwindSafe for AgentCallbackResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more