Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub struct CostEstimate {
pub total: Option<f64>,
pub currency: String,
pub input: Option<f64>,
pub output: Option<f64>,
pub cache_read: Option<f64>,
pub cache_write: Option<f64>,
pub source: CostSource,
pub pricing_provider: Option<String>,
pub pricing_model: Option<String>,
pub pricing_as_of: Option<String>,
pub pricing_source: Option<String>,
}
Normalized LLM response cost.
Provider-reported cost is preserved as-is. Model-pricing estimates include source and as-of metadata so downstream systems can audit stale pricing tables without losing a usable estimate.
total: Option<f64>Total cost in currency.
currency: StringISO 4217 currency code for the cost fields.
input: Option<f64>Uncached prompt/input token cost in currency.
output: Option<f64>Completion/output token cost in currency.
cache_read: Option<f64>Prompt cache read cost in currency.
cache_write: Option<f64>Prompt cache write cost in currency.
source: CostSourceOrigin of this cost value.
pricing_provider: Option<String>Provider associated with the cost or pricing estimate, if known.
pricing_model: Option<String>Model ID associated with the cost or pricing estimate, if known.
pricing_as_of: Option<String>Date the pricing value was last verified, if known.
pricing_source: Option<String>Source URL or label for the pricing value, if known.
impl CostEstimateimpl CostEstimate
total_or_component_sumpub fn total_or_component_sum(&self) -> Option<f64>
Returns the explicit total, or the sum of component costs when no total was supplied.
total_for_currencypub fn total_for_currency(&self, currency: &str) -> Option<f64>
Returns the total only when it is denominated in the requested currency.
total_or_component_sum_for_currencypub fn total_or_component_sum_for_currency(&self, currency: &str) -> Option<f64>
Returns the explicit or component-derived total in the requested currency.
impl Clone for CostEstimateimpl Clone for CostEstimate
clonefn clone(&self) -> CostEstimate
clone_fromfn clone_from(&mut self, source: &Self)
impl Debug for CostEstimateimpl Debug for CostEstimate
fmtfn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'de> Deserialize<'de> for CostEstimateimpl<'de> Deserialize<'de> for CostEstimate
deserializefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl PartialEq for CostEstimateimpl PartialEq for CostEstimate
eqfn eq(&self, other: &CostEstimate) -> bool
nefn ne(&self, other: &Rhs) -> bool
impl Serialize for CostEstimateimpl Serialize for CostEstimate
serializefn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl StructuralPartialEq for CostEstimateimpl StructuralPartialEq for CostEstimate