pub struct RateCatalog { /* private fields */ }Expand description
What a rate source offers for one region, before it becomes a RateTable.
This is the parse boundary COST-9 lives at. A transport — the Pricing API, a
recorded fixture, a mise run live:rates dump — assembles one of these, and
RateTable::from_catalog is the only door from here into a priced report. So
the ARM refusal cannot be bypassed by building a table directly, which is what it
could be in the Python.
Deliberately holds every entry the source offered, including the x86 compute rates. A catalog that filtered them out could not tell “the ARM line is gone and the x86 one is right there” from “the whole catalog is empty”, and those are different repairs: work out what AWS renamed, versus check the region.
Implementations§
Source§impl RateCatalog
impl RateCatalog
Sourcepub fn new() -> RateCatalog
pub fn new() -> RateCatalog
An empty catalog, to add entries to.
Sourcepub fn with_entry(
self,
group: impl Into<String>,
unit: impl Into<String>,
usd: Decimal,
) -> RateCatalog
pub fn with_entry( self, group: impl Into<String>, unit: impl Into<String>, usd: Decimal, ) -> RateCatalog
Records one priced line.
Trait Implementations§
Source§impl Clone for RateCatalog
impl Clone for RateCatalog
Source§fn clone(&self) -> RateCatalog
fn clone(&self) -> RateCatalog
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RateCatalog
impl Debug for RateCatalog
Source§impl Default for RateCatalog
impl Default for RateCatalog
Source§fn default() -> RateCatalog
fn default() -> RateCatalog
impl Eq for RateCatalog
Source§impl PartialEq for RateCatalog
impl PartialEq for RateCatalog
impl StructuralPartialEq for RateCatalog
Auto Trait Implementations§
impl Freeze for RateCatalog
impl RefUnwindSafe for RateCatalog
impl Send for RateCatalog
impl Sync for RateCatalog
impl Unpin for RateCatalog
impl UnsafeUnpin for RateCatalog
impl UnwindSafe for RateCatalog
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
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
key and return true if they are equal.