#[repr(i32)]pub enum RunState {
Unknown = 0,
Running = 1,
RestoreVm = 2,
Paused = 3,
SaveVm = 4,
Shutdown = 5,
Terminate = 7,
Reset = 9,
InternalError = 10,
Restart = 11,
Start = 12,
Stop = 13,
}Variants§
Unknown = 0
The emulator is in an unknown state. You cannot transition to this state.
Running = 1
Guest is actively running. You can transition to this state from the paused state.
RestoreVm = 2
Guest is paused to load a snapshot. You cannot transition to this state.
Paused = 3
Guest has been paused. Transitioning to this state will pause the emulator the guest will not be consuming any cpu cycles.
SaveVm = 4
Guest is paused to take or export a snapshot. You cannot transition to this state.
Shutdown = 5
System shutdown, note that it is similar to power off. It tries to set the system status and notify guest. The system is likely going to disappear soon and do proper cleanup of resources, possibly taking a snapshot. This is the same behavior as closing the emulator by clicking the X (close) in the user interface.
Terminate = 7
Immediately terminate the emulator. No resource cleanup will take place. There is a good change to corrupt the system.
Reset = 9
Will cause the emulator to reset. This is not a state you can observe.
InternalError = 10
Guest experienced some error state, you cannot transition to this state.
Restart = 11
Completely restart the emulator.
Start = 12
Resume a stopped emulator
Stop = 13
Stop (pause) a running emulator
Implementations§
Source§impl RunState
impl RunState
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for RunState
impl Ord for RunState
Source§impl PartialOrd for RunState
impl PartialOrd for RunState
impl Copy for RunState
impl Eq for RunState
impl StructuralPartialEq for RunState
Auto Trait Implementations§
impl Freeze for RunState
impl RefUnwindSafe for RunState
impl Send for RunState
impl Sync for RunState
impl Unpin for RunState
impl UnwindSafe for RunState
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request