pub struct AgentUsage {
pub prompt_tokens: Option<u32>,
pub completion_tokens: Option<u32>,
pub total_tokens: Option<u32>,
}Expand description
Token usage statistics
Fields§
§prompt_tokens: Option<u32>Input tokens
completion_tokens: Option<u32>Output tokens
total_tokens: Option<u32>Total tokens
Trait Implementations§
Source§impl Clone for AgentUsage
impl Clone for AgentUsage
Source§fn clone(&self) -> AgentUsage
fn clone(&self) -> AgentUsage
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 AgentUsage
impl Debug for AgentUsage
Source§impl<'de> Deserialize<'de> for AgentUsage
impl<'de> Deserialize<'de> for AgentUsage
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 AgentUsage
impl RefUnwindSafe for AgentUsage
impl Send for AgentUsage
impl Sync for AgentUsage
impl Unpin for AgentUsage
impl UnsafeUnpin for AgentUsage
impl UnwindSafe for AgentUsage
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