pub enum VersionStatus {
Active,
Inactive,
}Expand description
MicrovmImageVersionStatus, the model’s two values.
§Why this one is an enum where HookState is a bare String
A response is not a request (see MicrovmImageBuildSummaryWire::architecture): a value
AWS adds to a response enum must parse rather than fail, which is why the state fields
on every wire struct in this module are String. This type is only ever serialized —
the readback carries status as a String for exactly that reason — so narrowing it
costs nothing and buys the one thing a two-value enum can buy: "INACTIVATE",
"Inactive", and "DISABLED" are all compile errors rather than a rejected call.
The Display/as_str spelling is the model’s own casing, asserted against a literal in
the tests below rather than derived from the variant name.
Variants§
Active
RunMicrovm may launch this version.
Inactive
RunMicrovm refuses to launch this version. Running VMs are untouched.
Implementations§
Trait Implementations§
Source§impl Clone for VersionStatus
impl Clone for VersionStatus
Source§fn clone(&self) -> VersionStatus
fn clone(&self) -> VersionStatus
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 VersionStatus
Source§impl Debug for VersionStatus
impl Debug for VersionStatus
Source§impl Display for VersionStatus
impl Display for VersionStatus
impl Eq for VersionStatus
Source§impl FromStr for VersionStatus
impl FromStr for VersionStatus
Source§fn from_str(
text: &str,
) -> Result<VersionStatus, <VersionStatus as FromStr>::Err>
fn from_str( text: &str, ) -> Result<VersionStatus, <VersionStatus as FromStr>::Err>
The model’s spelling and nothing else, so a binding or a flag that takes the status as
text refuses "INACTIVATE" or "inactive" here, with the core’s message, before the
call rather than as a ValidationException in the middle of a rollback.
Source§impl PartialEq for VersionStatus
impl PartialEq for VersionStatus
Source§impl Serialize for VersionStatus
impl Serialize for VersionStatus
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for VersionStatus
Auto Trait Implementations§
impl Freeze for VersionStatus
impl RefUnwindSafe for VersionStatus
impl Send for VersionStatus
impl Sync for VersionStatus
impl Unpin for VersionStatus
impl UnsafeUnpin for VersionStatus
impl UnwindSafe for VersionStatus
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