Struct Pricing Catalog
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub struct PricingCatalog {
pub version: u32,
pub entries: Vec<ModelPricing>,
}
Collection of model pricing entries.
Fields
version: u32
Catalog schema version.
entries: Vec<ModelPricing>
Pricing entries keyed by canonical model ID plus aliases.
Implementations
impl PricingCatalog
impl PricingCatalog
from_json_str
pub fn from_json_str(catalog_json: &str) -> Result<Self, PricingCatalogError>
Parses and validates a pricing catalog from JSON.
pricing_for_model
pub fn pricing_for_model(&self, model: &str) -> Option<ModelPricing>
Finds pricing for a canonical model ID or alias.
pricing_for
pub fn pricing_for(
&self,
provider: Option<&str>,
model: &str,
) -> Option<ModelPricing>
Finds pricing for a provider/model pair, with model-only fallback.
Trait Implementations
impl Clone for PricingCatalog
impl Clone for PricingCatalog
clone
fn clone(&self) -> PricingCatalog
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for PricingCatalog
impl Debug for PricingCatalog
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'de> Deserialize<'de> for PricingCatalog
impl<'de> Deserialize<'de> for PricingCatalog
deserialize
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl PartialEq for PricingCatalog
impl PartialEq for PricingCatalog
eq
fn eq(&self, other: &PricingCatalog) -> bool
ne
fn ne(&self, other: &Rhs) -> bool
impl Serialize for PricingCatalog
impl Serialize for PricingCatalog
serialize
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl StructuralPartialEq for PricingCatalog
impl StructuralPartialEq for PricingCatalog