pub struct PricedUsageRow {
pub cost_usd: f64,
pub matched_model: Option<String>,
pub model: String,
pub usage: Value,
}Expand description
One priced model row of the usage --json output.
The old binary built each row as a serde_json::Value object, whose
serde_json::Map (this crate does not enable preserve_order) serializes
keys alphabetically. Fields are declared in that same alphabetical order
(cost_usd, matched_model, model, usage) so the derived output is
byte-for-byte identical to what the CLI has always emitted.
Fields§
§cost_usd: f64Resolved cost in USD.
matched_model: Option<String>The LiteLLM key actually used, when it differed from model.
model: StringModel name (merged across providers).
usage: ValueToken counts normalized to the flat key set (see normalize_usage_value).
Trait Implementations§
Source§impl Clone for PricedUsageRow
impl Clone for PricedUsageRow
Source§fn clone(&self) -> PricedUsageRow
fn clone(&self) -> PricedUsageRow
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 PricedUsageRow
impl Debug for PricedUsageRow
Auto Trait Implementations§
impl Freeze for PricedUsageRow
impl RefUnwindSafe for PricedUsageRow
impl Send for PricedUsageRow
impl Sync for PricedUsageRow
impl Unpin for PricedUsageRow
impl UnsafeUnpin for PricedUsageRow
impl UnwindSafe for PricedUsageRow
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> 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> 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