pub struct AgentResult {
pub text: String,
pub turns: usize,
pub tool_calls: usize,
pub subagents_spawned: usize,
pub total_input_tokens: u64,
pub total_output_tokens: u64,
pub total_tokens: u64,
}Fields§
§text: String§turns: usize§tool_calls: usize§subagents_spawned: usize§total_input_tokens: u64§total_output_tokens: u64§total_tokens: u64Implementations§
Source§impl AgentResult
impl AgentResult
Sourcepub fn usage(&self) -> TokenUsage
pub fn usage(&self) -> TokenUsage
the agent’s accumulated token usage (preserving its reported total_tokens
verbatim rather than recomputing from input+output).
Auto 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