pub struct Rate {
pub key: String,
pub name: String,
pub dollars: f64,
pub per: f64,
pub unit: Unit,
}Expand description
One price as callers are charged: dollars for every per units, the way a price is said
(“2.5 dollars per 1,000,000 tokens”). Every service’s pricing (GET /{service}/pricing)
lists its prices as rates.
Fields§
§key: StringWhat it prices, stable across releases: input, search, storage.
name: StringWhat it prices, as a person reads it: Input, Web search, Saved files.
dollars: f64§per: f64§unit: UnitImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rate
impl<'de> Deserialize<'de> for Rate
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 Rate
Auto Trait Implementations§
impl Forget for Rate
impl Freeze for Rate
impl Move for Rate
impl RefUnwindSafe for Rate
impl Send for Ratewhere
RawVecInner: Send,
impl Sync for Ratewhere
RawVecInner: Sync,
impl Unpin for Rate
impl UnsafeUnpin for Rate
impl UnwindSafe for Ratewhere
RawVecInner: UnwindSafe,
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