pub struct CostSummary {Show 14 fields
pub source: UsageSource,
pub source_name: String,
pub display_name: String,
pub range: UsageRange,
pub since: Option<NaiveDate>,
pub until: Option<NaiveDate>,
pub currency: String,
pub cost: Option<f64>,
pub cost_usd: Option<f64>,
pub tokens: TokenBreakdown,
pub models: Vec<ModelCostSummary>,
pub valid_entries: i64,
pub skipped_entries: i64,
pub elapsed_ms: f64,
}Expand description
Structured usage and cost summary for SDK consumers.
Fields§
§source: UsageSource§source_name: String§display_name: String§range: UsageRange§since: Option<NaiveDate>§until: Option<NaiveDate>§currency: String§cost: Option<f64>§cost_usd: Option<f64>§tokens: TokenBreakdown§models: Vec<ModelCostSummary>§valid_entries: i64§skipped_entries: i64§elapsed_ms: f64Trait Implementations§
Source§impl Clone for CostSummary
impl Clone for CostSummary
Source§fn clone(&self) -> CostSummary
fn clone(&self) -> CostSummary
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 CostSummary
impl Debug for CostSummary
Source§impl<'de> Deserialize<'de> for CostSummary
impl<'de> Deserialize<'de> for CostSummary
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 CostSummary
impl PartialEq for CostSummary
Source§fn eq(&self, other: &CostSummary) -> bool
fn eq(&self, other: &CostSummary) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CostSummary
impl Serialize for CostSummary
impl StructuralPartialEq for CostSummary
Auto Trait Implementations§
impl Freeze for CostSummary
impl RefUnwindSafe for CostSummary
impl Send for CostSummary
impl Sync for CostSummary
impl Unpin for CostSummary
impl UnsafeUnpin for CostSummary
impl UnwindSafe for CostSummary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more