pub enum Lifecycle {
Pending,
Running,
Suspending,
Suspended,
Terminating,
Terminated,
}Expand description
The symspec’s vm_state, verbatim.
Six states and no others, which is the S1 half of this module: a lifecycle held as a
String would let "RUNNING " and "Running" both exist, and every guard below would
have to decide which it meant.
Variants§
Pending
The initial state, and the state a launch is accepted into (STATE-1).
Running
The service reports RUNNING; launch has completed bootstrap, or adoption supplied the existing token (STATE-2).
Suspending
A suspend was accepted and the platform has not yet reported it complete (STATE-4).
Suspended
The platform reported suspension complete (STATE-6).
Terminating
A terminate was accepted (STATE-9).
Terminated
The platform reported termination complete (STATE-10).
Implementations§
Source§impl Lifecycle
impl Lifecycle
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The name the service uses for this state, which is also what an error message says.
Sourcepub fn from_service(state: &str) -> Option<Lifecycle>
pub fn from_service(state: &str) -> Option<Lifecycle>
The lifecycle the service’s state names, or None for a spelling this client does
not know. constants::MICROVM_STATES is the closed set, and a test ties the two.
Trait Implementations§
impl Copy for Lifecycle
impl Eq for Lifecycle
impl StructuralPartialEq for Lifecycle
Auto Trait Implementations§
impl Freeze for Lifecycle
impl RefUnwindSafe for Lifecycle
impl Send for Lifecycle
impl Sync for Lifecycle
impl Unpin for Lifecycle
impl UnsafeUnpin for Lifecycle
impl UnwindSafe for Lifecycle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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