pub struct RateCard {
pub platform: Platform,
pub tier: PricingTier,
pub data_residency: DataResidency,
pub regional_endpoint: bool,
pub fast_mode: bool,
}Expand description
A selectable rate card: platform × tier × modifiers. The Default
(first-party, standard, global, no premium) reproduces legacy pricing.
Fields§
§platform: Platform§tier: PricingTier§data_residency: DataResidency§regional_endpoint: boolRegional/multi-region endpoint — +10% on eligible models.
fast_mode: boolUse the model’s fast-mode premium rates (if defined).
Implementations§
Source§impl RateCard
impl RateCard
Sourcepub fn parse(s: &str) -> Result<RateCard, CostError>
pub fn parse(s: &str) -> Result<RateCard, CostError>
Parse a forgiving string such as "batch", "bedrock:batch",
"vertex/standard,us", "azure regional", or "first_party/fast".
Tokens may be separated by any of / : , + or whitespace; order is
irrelevant. An empty string (or "standard") yields the default card.
Trait Implementations§
impl Copy for RateCard
Source§impl<'de> Deserialize<'de> for RateCard
impl<'de> Deserialize<'de> for RateCard
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 RateCard
Auto Trait Implementations§
impl Freeze for RateCard
impl RefUnwindSafe for RateCard
impl Send for RateCard
impl Sync for RateCard
impl Unpin for RateCard
impl UnsafeUnpin for RateCard
impl UnwindSafe for RateCard
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