pub struct Pricing {
pub kind: PricingKind,
pub paid: Option<PaidPricing>,
pub paid_pricing: Vec<PaidPricingEntry>,
pub component: Option<ComponentPricing>,
pub extra: BTreeMap<String, Value>,
}Fields§
§kind: PricingKind§paid: Option<PaidPricing>§paid_pricing: Vec<PaidPricingEntry>§component: Option<ComponentPricing>§extra: BTreeMap<String, Value>Implementations§
Source§impl Pricing
impl Pricing
Sourcepub fn selector_keys(&self) -> BTreeSet<String>
pub fn selector_keys(&self) -> BTreeSet<String>
Keys that select a pricing tier via --config (the union of keys across
paid_pricing[].configuration, e.g. instance_type).
Sourcepub fn selector_values(&self, key: &str) -> Vec<Value>
pub fn selector_values(&self, key: &str) -> Vec<Value>
Distinct allowed values for a tier-selector key.
Sourcepub fn match_tier(&self, config: &Value) -> Option<&PaidPricingEntry>
pub fn match_tier(&self, config: &Value) -> Option<&PaidPricingEntry>
The pricing tier selected by a --config: the entry whose
configuration is fully satisfied by config, else the default entry.
Sourcepub fn requires_confirmation(&self, config: &Value) -> bool
pub fn requires_confirmation(&self, config: &Value) -> bool
Whether the selected tier requires paid confirmation.
Sourcepub fn requires_confirmation_with_paid(
&self,
config: &Value,
confirm_paid: bool,
) -> bool
pub fn requires_confirmation_with_paid( &self, config: &Value, confirm_paid: bool, ) -> bool
Like [requires_confirmation], but selects component-pricing tiers with
confirm_paid so parent-plan provisioning matches the child add.
Sourcepub fn required_parent_services(
&self,
_config: &Value,
prefer_paid: bool,
) -> Vec<String>
pub fn required_parent_services( &self, _config: &Value, prefer_paid: bool, ) -> Vec<String>
Parent plan service_ids required before provisioning config, from the
selected component-pricing option. Empty when unambiguous parents are
absent (multi-parent options are left to substrate-specific handling).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pricing
impl<'de> Deserialize<'de> for Pricing
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
Auto Trait Implementations§
impl Freeze for Pricing
impl RefUnwindSafe for Pricing
impl Send for Pricing
impl Sync for Pricing
impl Unpin for Pricing
impl UnsafeUnpin for Pricing
impl UnwindSafe for Pricing
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