Enum aws_sdk_sagemaker::types::AppInstanceType
source · #[non_exhaustive]
pub enum AppInstanceType {
Show 59 variants
MlC512Xlarge,
MlC518Xlarge,
MlC524Xlarge,
MlC52Xlarge,
MlC54Xlarge,
MlC59Xlarge,
MlC5Large,
MlC5Xlarge,
MlG4Dn12Xlarge,
MlG4Dn16Xlarge,
MlG4Dn2Xlarge,
MlG4Dn4Xlarge,
MlG4Dn8Xlarge,
MlG4DnXlarge,
MlG512Xlarge,
MlG516Xlarge,
MlG524Xlarge,
MlG52Xlarge,
MlG548Xlarge,
MlG54Xlarge,
MlG58Xlarge,
MlG5Xlarge,
MlGeospatialInteractive,
MlM512Xlarge,
MlM516Xlarge,
MlM524Xlarge,
MlM52Xlarge,
MlM54Xlarge,
MlM58Xlarge,
MlM5Large,
MlM5Xlarge,
MlM5D12Xlarge,
MlM5D16Xlarge,
MlM5D24Xlarge,
MlM5D2Xlarge,
MlM5D4Xlarge,
MlM5D8Xlarge,
MlM5DLarge,
MlM5DXlarge,
MlP316Xlarge,
MlP32Xlarge,
MlP38Xlarge,
MlP3Dn24Xlarge,
MlR512Xlarge,
MlR516Xlarge,
MlR524Xlarge,
MlR52Xlarge,
MlR54Xlarge,
MlR58Xlarge,
MlR5Large,
MlR5Xlarge,
MlT32Xlarge,
MlT3Large,
MlT3Medium,
MlT3Micro,
MlT3Small,
MlT3Xlarge,
System,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against AppInstanceType
, it is important to ensure
your code is forward-compatible. That is, if a match arm handles a case for a
feature that is supported by the service but has not been represented as an enum
variant in a current version of SDK, your code should continue to work when you
upgrade SDK to a future version in which the enum does include a variant for that
feature.
Here is an example of how you can make a match expression forward-compatible:
# let appinstancetype = unimplemented!();
match appinstancetype {
AppInstanceType::MlC512Xlarge => { /* ... */ },
AppInstanceType::MlC518Xlarge => { /* ... */ },
AppInstanceType::MlC524Xlarge => { /* ... */ },
AppInstanceType::MlC52Xlarge => { /* ... */ },
AppInstanceType::MlC54Xlarge => { /* ... */ },
AppInstanceType::MlC59Xlarge => { /* ... */ },
AppInstanceType::MlC5Large => { /* ... */ },
AppInstanceType::MlC5Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn12Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn16Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn2Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn4Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn8Xlarge => { /* ... */ },
AppInstanceType::MlG4DnXlarge => { /* ... */ },
AppInstanceType::MlG512Xlarge => { /* ... */ },
AppInstanceType::MlG516Xlarge => { /* ... */ },
AppInstanceType::MlG524Xlarge => { /* ... */ },
AppInstanceType::MlG52Xlarge => { /* ... */ },
AppInstanceType::MlG548Xlarge => { /* ... */ },
AppInstanceType::MlG54Xlarge => { /* ... */ },
AppInstanceType::MlG58Xlarge => { /* ... */ },
AppInstanceType::MlG5Xlarge => { /* ... */ },
AppInstanceType::MlGeospatialInteractive => { /* ... */ },
AppInstanceType::MlM512Xlarge => { /* ... */ },
AppInstanceType::MlM516Xlarge => { /* ... */ },
AppInstanceType::MlM524Xlarge => { /* ... */ },
AppInstanceType::MlM52Xlarge => { /* ... */ },
AppInstanceType::MlM54Xlarge => { /* ... */ },
AppInstanceType::MlM58Xlarge => { /* ... */ },
AppInstanceType::MlM5Large => { /* ... */ },
AppInstanceType::MlM5Xlarge => { /* ... */ },
AppInstanceType::MlM5D12Xlarge => { /* ... */ },
AppInstanceType::MlM5D16Xlarge => { /* ... */ },
AppInstanceType::MlM5D24Xlarge => { /* ... */ },
AppInstanceType::MlM5D2Xlarge => { /* ... */ },
AppInstanceType::MlM5D4Xlarge => { /* ... */ },
AppInstanceType::MlM5D8Xlarge => { /* ... */ },
AppInstanceType::MlM5DLarge => { /* ... */ },
AppInstanceType::MlM5DXlarge => { /* ... */ },
AppInstanceType::MlP316Xlarge => { /* ... */ },
AppInstanceType::MlP32Xlarge => { /* ... */ },
AppInstanceType::MlP38Xlarge => { /* ... */ },
AppInstanceType::MlP3Dn24Xlarge => { /* ... */ },
AppInstanceType::MlR512Xlarge => { /* ... */ },
AppInstanceType::MlR516Xlarge => { /* ... */ },
AppInstanceType::MlR524Xlarge => { /* ... */ },
AppInstanceType::MlR52Xlarge => { /* ... */ },
AppInstanceType::MlR54Xlarge => { /* ... */ },
AppInstanceType::MlR58Xlarge => { /* ... */ },
AppInstanceType::MlR5Large => { /* ... */ },
AppInstanceType::MlR5Xlarge => { /* ... */ },
AppInstanceType::MlT32Xlarge => { /* ... */ },
AppInstanceType::MlT3Large => { /* ... */ },
AppInstanceType::MlT3Medium => { /* ... */ },
AppInstanceType::MlT3Micro => { /* ... */ },
AppInstanceType::MlT3Small => { /* ... */ },
AppInstanceType::MlT3Xlarge => { /* ... */ },
AppInstanceType::System => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when appinstancetype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant AppInstanceType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
AppInstanceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))
and calling as_str
on it yields "NewFeature"
.
This match expression is forward-compatible when executed with a newer
version of SDK where the variant AppInstanceType::NewFeature
is defined.
Specifically, when appinstancetype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on AppInstanceType::NewFeature
also yielding "NewFeature"
.
Explicitly matching on the Unknown
variant should
be avoided for two reasons:
- The inner data
UnknownVariantValue
is opaque, and no further information can be extracted. - It might inadvertently shadow other intended match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MlC512Xlarge
MlC518Xlarge
MlC524Xlarge
MlC52Xlarge
MlC54Xlarge
MlC59Xlarge
MlC5Large
MlC5Xlarge
MlG4Dn12Xlarge
MlG4Dn16Xlarge
MlG4Dn2Xlarge
MlG4Dn4Xlarge
MlG4Dn8Xlarge
MlG4DnXlarge
MlG512Xlarge
MlG516Xlarge
MlG524Xlarge
MlG52Xlarge
MlG548Xlarge
MlG54Xlarge
MlG58Xlarge
MlG5Xlarge
MlGeospatialInteractive
MlM512Xlarge
MlM516Xlarge
MlM524Xlarge
MlM52Xlarge
MlM54Xlarge
MlM58Xlarge
MlM5Large
MlM5Xlarge
MlM5D12Xlarge
MlM5D16Xlarge
MlM5D24Xlarge
MlM5D2Xlarge
MlM5D4Xlarge
MlM5D8Xlarge
MlM5DLarge
MlM5DXlarge
MlP316Xlarge
MlP32Xlarge
MlP38Xlarge
MlP3Dn24Xlarge
MlR512Xlarge
MlR516Xlarge
MlR524Xlarge
MlR52Xlarge
MlR54Xlarge
MlR58Xlarge
MlR5Large
MlR5Xlarge
MlT32Xlarge
MlT3Large
MlT3Medium
MlT3Micro
MlT3Small
MlT3Xlarge
System
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
Trait Implementations§
source§impl AsRef<str> for AppInstanceType
impl AsRef<str> for AppInstanceType
source§impl Clone for AppInstanceType
impl Clone for AppInstanceType
source§fn clone(&self) -> AppInstanceType
fn clone(&self) -> AppInstanceType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AppInstanceType
impl Debug for AppInstanceType
source§impl From<&str> for AppInstanceType
impl From<&str> for AppInstanceType
source§impl FromStr for AppInstanceType
impl FromStr for AppInstanceType
source§impl Hash for AppInstanceType
impl Hash for AppInstanceType
source§impl Ord for AppInstanceType
impl Ord for AppInstanceType
source§fn cmp(&self, other: &AppInstanceType) -> Ordering
fn cmp(&self, other: &AppInstanceType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<AppInstanceType> for AppInstanceType
impl PartialEq<AppInstanceType> for AppInstanceType
source§fn eq(&self, other: &AppInstanceType) -> bool
fn eq(&self, other: &AppInstanceType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<AppInstanceType> for AppInstanceType
impl PartialOrd<AppInstanceType> for AppInstanceType
source§fn partial_cmp(&self, other: &AppInstanceType) -> Option<Ordering>
fn partial_cmp(&self, other: &AppInstanceType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for AppInstanceType
impl StructuralEq for AppInstanceType
impl StructuralPartialEq for AppInstanceType
Auto Trait Implementations§
impl RefUnwindSafe for AppInstanceType
impl Send for AppInstanceType
impl Sync for AppInstanceType
impl Unpin for AppInstanceType
impl UnwindSafe for AppInstanceType
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.