pub struct ModelPrice {
pub model_id: String,
pub display_name: Option<String>,
pub aliases: Vec<String>,
pub input_per_1m: UsdAmount,
pub output_per_1m: UsdAmount,
pub cache_read_input_per_1m: Option<UsdAmount>,
pub cache_creation_input_per_1m: Option<UsdAmount>,
pub source: String,
pub confidence: CostConfidence,
}Fields§
§model_id: String§display_name: Option<String>§aliases: Vec<String>§input_per_1m: UsdAmount§output_per_1m: UsdAmount§cache_read_input_per_1m: Option<UsdAmount>§cache_creation_input_per_1m: Option<UsdAmount>§source: String§confidence: CostConfidenceImplementations§
Source§impl ModelPrice
impl ModelPrice
pub fn from_per_million_usd( model_id: impl Into<String>, display_name: Option<String>, input: &str, output: &str, cache_read: Option<&str>, cache_creation: Option<&str>, source: impl Into<String>, ) -> Option<Self>
pub fn with_aliases( self, aliases: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Trait Implementations§
Source§impl Clone for ModelPrice
impl Clone for ModelPrice
Source§fn clone(&self) -> ModelPrice
fn clone(&self) -> ModelPrice
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 ModelPrice
impl Debug for ModelPrice
Source§impl From<&ModelPrice> for ModelPriceView
impl From<&ModelPrice> for ModelPriceView
Source§fn from(price: &ModelPrice) -> Self
fn from(price: &ModelPrice) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ModelPrice
impl PartialEq for ModelPrice
Source§fn eq(&self, other: &ModelPrice) -> bool
fn eq(&self, other: &ModelPrice) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ModelPrice
impl StructuralPartialEq for ModelPrice
Auto Trait Implementations§
impl Freeze for ModelPrice
impl RefUnwindSafe for ModelPrice
impl Send for ModelPrice
impl Sync for ModelPrice
impl Unpin for ModelPrice
impl UnsafeUnpin for ModelPrice
impl UnwindSafe for ModelPrice
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.