pub struct CostUsage {
pub amount: f64,
pub currency: String,
pub provider_amount: Option<String>,
}Expand description
Monetary cost for a single model turn.
Fields§
§amount: f64The cost amount as a floating-point number.
currency: StringThe ISO 4217 currency code (e.g. "USD").
provider_amount: Option<String>An optional provider-specific cost string for display purposes.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CostUsage
impl<'de> Deserialize<'de> for CostUsage
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
impl StructuralPartialEq for CostUsage
Auto Trait Implementations§
impl Freeze for CostUsage
impl RefUnwindSafe for CostUsage
impl Send for CostUsage
impl Sync for CostUsage
impl Unpin for CostUsage
impl UnsafeUnpin for CostUsage
impl UnwindSafe for CostUsage
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