pub struct ModelSpend {
pub calls: usize,
pub prompt_tokens: usize,
pub completion_tokens: usize,
pub cost_usd: f64,
}Expand description
Aggregated spend of one (provider, model) key.
Fields§
§calls: usizeNumber of calls.
prompt_tokens: usizeCumulative prompt tokens.
completion_tokens: usizeCumulative completion tokens.
cost_usd: f64Cumulative USD spend.
Trait Implementations§
Source§impl Clone for ModelSpend
impl Clone for ModelSpend
Source§fn clone(&self) -> ModelSpend
fn clone(&self) -> ModelSpend
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 moreSource§impl Debug for ModelSpend
impl Debug for ModelSpend
Source§impl Default for ModelSpend
impl Default for ModelSpend
Source§fn default() -> ModelSpend
fn default() -> ModelSpend
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelSpend
impl<'de> Deserialize<'de> for ModelSpend
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
Source§impl PartialEq for ModelSpend
impl PartialEq for ModelSpend
Source§impl Serialize for ModelSpend
impl Serialize for ModelSpend
impl StructuralPartialEq for ModelSpend
Auto Trait Implementations§
impl Freeze for ModelSpend
impl RefUnwindSafe for ModelSpend
impl Send for ModelSpend
impl Sync for ModelSpend
impl Unpin for ModelSpend
impl UnsafeUnpin for ModelSpend
impl UnwindSafe for ModelSpend
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