pub struct AgentResult {
pub messages: Vec<Message>,
pub final_message: AssistantMessage,
pub total_usage: Usage,
pub turn_count: u32,
pub stop_reason: StopReason,
}Expand description
The final outcome of an agent run.
Fields§
§messages: Vec<Message>All messages accumulated during the run (user + assistant + tool results).
final_message: AssistantMessageThe last assistant message before the loop ended.
total_usage: UsageAggregate token usage across all turns.
turn_count: u32How many turns the agent executed.
stop_reason: StopReasonWhy the agent stopped.
Trait Implementations§
Source§impl Clone for AgentResult
impl Clone for AgentResult
Source§fn clone(&self) -> AgentResult
fn clone(&self) -> AgentResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentResult
impl RefUnwindSafe for AgentResult
impl Send for AgentResult
impl Sync for AgentResult
impl Unpin for AgentResult
impl UnsafeUnpin for AgentResult
impl UnwindSafe for AgentResult
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