pub struct UsageSummary {
pub total_prompt_tokens: u64,
pub total_completion_tokens: u64,
pub total_tokens: u64,
pub total_cost: Option<f64>,
pub by_model: HashMap<String, ModelUsage>,
}Expand description
Usage summary for the session
Fields§
§total_prompt_tokens: u64§total_completion_tokens: u64§total_tokens: u64§total_cost: Option<f64>§by_model: HashMap<String, ModelUsage>Implementations§
Trait Implementations§
Source§impl Clone for UsageSummary
impl Clone for UsageSummary
Source§fn clone(&self) -> UsageSummary
fn clone(&self) -> UsageSummary
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 UsageSummary
impl Debug for UsageSummary
Source§impl Default for UsageSummary
impl Default for UsageSummary
Source§fn default() -> UsageSummary
fn default() -> UsageSummary
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UsageSummary
impl<'de> Deserialize<'de> for UsageSummary
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 UsageSummary
impl RefUnwindSafe for UsageSummary
impl Send for UsageSummary
impl Sync for UsageSummary
impl Unpin for UsageSummary
impl UnsafeUnpin for UsageSummary
impl UnwindSafe for UsageSummary
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