pub struct CostEstimate {
pub input_usd: f64,
pub output_usd: f64,
}Expand description
Computed cost breakdown in USD.
Fields§
§input_usd: f64Cost of input tokens.
output_usd: f64Cost of output tokens.
Implementations§
Trait Implementations§
Source§impl Add for CostEstimate
impl Add for CostEstimate
Source§type Output = CostEstimate
type Output = CostEstimate
The resulting type after applying the
+ operator.Source§fn add(self, rhs: CostEstimate) -> CostEstimate
fn add(self, rhs: CostEstimate) -> CostEstimate
Performs the
+ operation. Read moreSource§impl Clone for CostEstimate
impl Clone for CostEstimate
Source§fn clone(&self) -> CostEstimate
fn clone(&self) -> CostEstimate
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 moreimpl Copy for CostEstimate
Source§impl Debug for CostEstimate
impl Debug for CostEstimate
Source§impl Default for CostEstimate
impl Default for CostEstimate
Source§fn default() -> CostEstimate
fn default() -> CostEstimate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CostEstimate
impl<'de> Deserialize<'de> for CostEstimate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CostEstimate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CostEstimate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CostEstimate
impl PartialEq for CostEstimate
Source§fn eq(&self, other: &CostEstimate) -> bool
fn eq(&self, other: &CostEstimate) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CostEstimate
impl Serialize for CostEstimate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CostEstimate
Auto Trait Implementations§
impl Freeze for CostEstimate
impl RefUnwindSafe for CostEstimate
impl Send for CostEstimate
impl Sync for CostEstimate
impl Unpin for CostEstimate
impl UnsafeUnpin for CostEstimate
impl UnwindSafe for CostEstimate
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