#[non_exhaustive]
pub enum EsPartitionInstanceType {
Show 59 variants
C42xlargeElasticsearch,
C44xlargeElasticsearch,
C48xlargeElasticsearch,
C4LargeElasticsearch,
C4XlargeElasticsearch,
C518xlargeElasticsearch,
C52xlargeElasticsearch,
C54xlargeElasticsearch,
C59xlargeElasticsearch,
C5LargeElasticsearch,
C5XlargeElasticsearch,
D22xlargeElasticsearch,
D24xlargeElasticsearch,
D28xlargeElasticsearch,
D2XlargeElasticsearch,
I22xlargeElasticsearch,
I2XlargeElasticsearch,
I316xlargeElasticsearch,
I32xlargeElasticsearch,
I34xlargeElasticsearch,
I38xlargeElasticsearch,
I3LargeElasticsearch,
I3XlargeElasticsearch,
M32xlargeElasticsearch,
M3LargeElasticsearch,
M3MediumElasticsearch,
M3XlargeElasticsearch,
M410xlargeElasticsearch,
M42xlargeElasticsearch,
M44xlargeElasticsearch,
M4LargeElasticsearch,
M4XlargeElasticsearch,
M512xlargeElasticsearch,
M52xlargeElasticsearch,
M54xlargeElasticsearch,
M5LargeElasticsearch,
M5XlargeElasticsearch,
R32xlargeElasticsearch,
R34xlargeElasticsearch,
R38xlargeElasticsearch,
R3LargeElasticsearch,
R3XlargeElasticsearch,
R416xlargeElasticsearch,
R42xlargeElasticsearch,
R44xlargeElasticsearch,
R48xlargeElasticsearch,
R4LargeElasticsearch,
R4XlargeElasticsearch,
R512xlargeElasticsearch,
R52xlargeElasticsearch,
R54xlargeElasticsearch,
R5LargeElasticsearch,
R5XlargeElasticsearch,
T2MediumElasticsearch,
T2MicroElasticsearch,
T2SmallElasticsearch,
Ultrawarm1LargeElasticsearch,
Ultrawarm1MediumElasticsearch,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against EsPartitionInstanceType
, 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 espartitioninstancetype = unimplemented!();
match espartitioninstancetype {
EsPartitionInstanceType::C42xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C44xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C48xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C4LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C4XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C518xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C52xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C54xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C59xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C5LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::C5XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::D22xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::D24xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::D28xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::D2XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::I22xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::I2XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::I316xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::I32xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::I34xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::I38xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::I3LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::I3XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M32xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M3LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M3MediumElasticsearch => { /* ... */ },
EsPartitionInstanceType::M3XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M410xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M42xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M44xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M4LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M4XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M512xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M52xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M54xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M5LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::M5XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R32xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R34xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R38xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R3LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R3XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R416xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R42xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R44xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R48xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R4LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R4XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R512xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R52xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R54xlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R5LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::R5XlargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::T2MediumElasticsearch => { /* ... */ },
EsPartitionInstanceType::T2MicroElasticsearch => { /* ... */ },
EsPartitionInstanceType::T2SmallElasticsearch => { /* ... */ },
EsPartitionInstanceType::Ultrawarm1LargeElasticsearch => { /* ... */ },
EsPartitionInstanceType::Ultrawarm1MediumElasticsearch => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when espartitioninstancetype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant EsPartitionInstanceType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
EsPartitionInstanceType::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 EsPartitionInstanceType::NewFeature
is defined.
Specifically, when espartitioninstancetype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on EsPartitionInstanceType::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
C42xlargeElasticsearch
C44xlargeElasticsearch
C48xlargeElasticsearch
C4LargeElasticsearch
C4XlargeElasticsearch
C518xlargeElasticsearch
C52xlargeElasticsearch
C54xlargeElasticsearch
C59xlargeElasticsearch
C5LargeElasticsearch
C5XlargeElasticsearch
D22xlargeElasticsearch
D24xlargeElasticsearch
D28xlargeElasticsearch
D2XlargeElasticsearch
I22xlargeElasticsearch
I2XlargeElasticsearch
I316xlargeElasticsearch
I32xlargeElasticsearch
I34xlargeElasticsearch
I38xlargeElasticsearch
I3LargeElasticsearch
I3XlargeElasticsearch
M32xlargeElasticsearch
M3LargeElasticsearch
M3MediumElasticsearch
M3XlargeElasticsearch
M410xlargeElasticsearch
M42xlargeElasticsearch
M44xlargeElasticsearch
M4LargeElasticsearch
M4XlargeElasticsearch
M512xlargeElasticsearch
M52xlargeElasticsearch
M54xlargeElasticsearch
M5LargeElasticsearch
M5XlargeElasticsearch
R32xlargeElasticsearch
R34xlargeElasticsearch
R38xlargeElasticsearch
R3LargeElasticsearch
R3XlargeElasticsearch
R416xlargeElasticsearch
R42xlargeElasticsearch
R44xlargeElasticsearch
R48xlargeElasticsearch
R4LargeElasticsearch
R4XlargeElasticsearch
R512xlargeElasticsearch
R52xlargeElasticsearch
R54xlargeElasticsearch
R5LargeElasticsearch
R5XlargeElasticsearch
T2MediumElasticsearch
T2MicroElasticsearch
T2SmallElasticsearch
Ultrawarm1LargeElasticsearch
Ultrawarm1MediumElasticsearch
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
Trait Implementations§
source§impl AsRef<str> for EsPartitionInstanceType
impl AsRef<str> for EsPartitionInstanceType
source§impl Clone for EsPartitionInstanceType
impl Clone for EsPartitionInstanceType
source§fn clone(&self) -> EsPartitionInstanceType
fn clone(&self) -> EsPartitionInstanceType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EsPartitionInstanceType
impl Debug for EsPartitionInstanceType
source§impl From<&str> for EsPartitionInstanceType
impl From<&str> for EsPartitionInstanceType
source§impl FromStr for EsPartitionInstanceType
impl FromStr for EsPartitionInstanceType
source§impl Hash for EsPartitionInstanceType
impl Hash for EsPartitionInstanceType
source§impl Ord for EsPartitionInstanceType
impl Ord for EsPartitionInstanceType
source§fn cmp(&self, other: &EsPartitionInstanceType) -> Ordering
fn cmp(&self, other: &EsPartitionInstanceType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<EsPartitionInstanceType> for EsPartitionInstanceType
impl PartialEq<EsPartitionInstanceType> for EsPartitionInstanceType
source§fn eq(&self, other: &EsPartitionInstanceType) -> bool
fn eq(&self, other: &EsPartitionInstanceType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<EsPartitionInstanceType> for EsPartitionInstanceType
impl PartialOrd<EsPartitionInstanceType> for EsPartitionInstanceType
source§fn partial_cmp(&self, other: &EsPartitionInstanceType) -> Option<Ordering>
fn partial_cmp(&self, other: &EsPartitionInstanceType) -> 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 EsPartitionInstanceType
impl StructuralEq for EsPartitionInstanceType
impl StructuralPartialEq for EsPartitionInstanceType
Auto Trait Implementations§
impl RefUnwindSafe for EsPartitionInstanceType
impl Send for EsPartitionInstanceType
impl Sync for EsPartitionInstanceType
impl Unpin for EsPartitionInstanceType
impl UnwindSafe for EsPartitionInstanceType
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.