pub struct CostSeriesPoint {
pub timestamp: i64,
pub model: Option<String>,
pub input_tokens: u64,
pub output_tokens: u64,
pub cache_creation_tokens: u64,
pub cache_read_tokens: u64,
pub requests: usize,
pub cost: Option<f64>,
pub cost_source: Option<String>,
}Expand description
A single time-bucketed cost/usage data point
Fields§
§timestamp: i64Bucket start timestamp in nanoseconds since Unix epoch
model: Option<String>Model name (nullable — spans without a model attribute are grouped under null)
input_tokens: u64Input tokens in this bucket
output_tokens: u64Output tokens in this bucket
cache_creation_tokens: u64Cache creation input tokens (Anthropic prompt caching)
cache_read_tokens: u64Cache read input tokens (Anthropic prompt caching)
requests: usizeNumber of requests in this bucket
cost: Option<f64>Estimated cost in USD for this bucket, computed server-side. None when
no pricing data matched the bucket’s model.
cost_source: Option<String>Origin of the cost figure: “litellm”, “fallback”, or “none”.
Trait Implementations§
Source§impl Clone for CostSeriesPoint
impl Clone for CostSeriesPoint
Source§fn clone(&self) -> CostSeriesPoint
fn clone(&self) -> CostSeriesPoint
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 CostSeriesPoint
impl Debug for CostSeriesPoint
Source§impl<'de> Deserialize<'de> for CostSeriesPoint
impl<'de> Deserialize<'de> for CostSeriesPoint
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 CostSeriesPoint
impl RefUnwindSafe for CostSeriesPoint
impl Send for CostSeriesPoint
impl Sync for CostSeriesPoint
impl Unpin for CostSeriesPoint
impl UnsafeUnpin for CostSeriesPoint
impl UnwindSafe for CostSeriesPoint
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