pub struct ToolUsage {
pub prompt_tokens: u64,
pub completion_tokens: u64,
pub cost_units: u64,
}Expand description
Actual usage reported by one completed tool execution.
Fields§
§prompt_tokens: u64Model input tokens consumed inside the tool.
completion_tokens: u64Model output tokens consumed inside the tool.
cost_units: u64Provider-neutral non-token cost units.
Trait Implementations§
impl Copy for ToolUsage
impl Eq for ToolUsage
impl StructuralPartialEq for ToolUsage
Auto Trait Implementations§
impl Freeze for ToolUsage
impl RefUnwindSafe for ToolUsage
impl Send for ToolUsage
impl Sync for ToolUsage
impl Unpin for ToolUsage
impl UnsafeUnpin for ToolUsage
impl UnwindSafe for ToolUsage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.