pub enum CatalogLine {
VcpuSecond,
MemoryGbSecond,
SnapshotStorageGbHour,
SnapshotReadGb,
SnapshotWriteGb,
}Expand description
One rate the catalog has to carry, and what it fills.
The Python held this as pricing.MICROVM_LINES, a tuple of RateLine records
naming a group, a usagetype, a unit, and — for the two compute lines — an
x86_group probed only when the ARM line was missing. Same shape here, as a
closed enum: the catalog has five lines this client reads, and a sixth is not a
value that exists.
Variants§
VcpuSecond
MemoryGbSecond
SnapshotStorageGbHour
Quoted per GB-hour by the API. Converted once, in
RateTable::from_catalog.
SnapshotReadGb
SnapshotWriteGb
Implementations§
Source§impl CatalogLine
impl CatalogLine
Sourcepub const ALL: [CatalogLine; 5]
pub const ALL: [CatalogLine; 5]
Every line, in the order the Python’s MICROVM_LINES declares them.
Sourcepub fn group(self) -> &'static str
pub fn group(self) -> &'static str
The region-independent group attribute, which is what a fetch filters on.
usagetype carries a location prefix in every region except us-east-1
(Lambda-MicroVM-vCPU-Second-ARM is USW2-Lambda-MicroVM-vCPU-Second-ARM in
us-west-2), so comparing raw usage types across regions matches nothing and
yields a table of holes rather than an error. group does not.
Sourcepub fn field(self) -> &'static str
pub fn field(self) -> &'static str
The RateTable field this fills, as the Python’s RateLine.field spells
it — so a drift report names the same thing in both clients.
Sourcepub fn unit(self) -> &'static str
pub fn unit(self) -> &'static str
The unit the API must report for this line.
Checked rather than assumed. It is the only signal available if AWS restates storage per GB-month: the number would change by 730x and every arithmetic check downstream would still pass, because they all read the same table.
Sourcepub fn x86_group(self) -> Option<&'static str>
pub fn x86_group(self) -> Option<&'static str>
The x86 sibling, for the two compute lines that have one (COST-9).
Named so the refusal can say what it is refusing. MicroVMs are ARM64-only —
the Architecture shape is enum: ['ARM_64'] with no other member — so the
x86 rate can never apply, and it is 17.9% higher. Snapshot lines have no
architecture variant, so there is nothing to refuse.
Sourcepub fn is_per_hour(self) -> bool
pub fn is_per_hour(self) -> bool
True for storage, quoted per GB-hour where RateTable holds per GB-month.
Trait Implementations§
Source§impl Clone for CatalogLine
impl Clone for CatalogLine
Source§fn clone(&self) -> CatalogLine
fn clone(&self) -> CatalogLine
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CatalogLine
Source§impl Debug for CatalogLine
impl Debug for CatalogLine
impl Eq for CatalogLine
Source§impl Hash for CatalogLine
impl Hash for CatalogLine
Source§impl PartialEq for CatalogLine
impl PartialEq for CatalogLine
impl StructuralPartialEq for CatalogLine
Auto Trait Implementations§
impl Freeze for CatalogLine
impl RefUnwindSafe for CatalogLine
impl Send for CatalogLine
impl Sync for CatalogLine
impl Unpin for CatalogLine
impl UnsafeUnpin for CatalogLine
impl UnwindSafe for CatalogLine
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more