pub struct CostData {
pub model: String,
pub provider: String,
pub total_usage: TokenUsage,
pub total_llm_latency_ms: u64,
pub cost_usd: Option<f64>,
pub pricing: Option<CostPricing>,
}Expand description
Accumulated cost data for a single agent run.
Fields§
§model: StringModel name used for the run.
provider: StringProvider identifier.
total_usage: TokenUsageTotal token usage across all LLM calls.
total_llm_latency_ms: u64Total LLM latency in milliseconds.
cost_usd: Option<f64>Computed cost in USD (None if pricing is unknown for the model).
pricing: Option<CostPricing>Pricing rates used for the computation (None if unknown).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CostData
impl<'de> Deserialize<'de> for CostData
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 CostData
impl RefUnwindSafe for CostData
impl Send for CostData
impl Sync for CostData
impl Unpin for CostData
impl UnsafeUnpin for CostData
impl UnwindSafe for CostData
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.