#[repr(C)]pub enum SwapState {
Ready = 0,
Failed = 1,
Pending = 2,
TrimInProgress = 3,
SwapOutInProgress = 4,
Active = 5,
SwapInInProgress = 6,
}
Expand description
Current state of vmm-swap.
This should not contain fields but be a plain enum because this will be displayed to user using
serde_json
crate.
Variants§
Ready = 0
vmm-swap is ready. userfaultfd is disabled until vmm-swap is enabled.
Failed = 1
swap out failed.
Pending = 2
Pages in guest memory are moved to the staging memory.
TrimInProgress = 3
Trimming staging memory.
SwapOutInProgress = 4
swap-out is in progress.
Active = 5
swap out succeeded.
SwapInInProgress = 6
swap-in is in progress.
Trait Implementations§
source§impl<'de> Deserialize<'de> for SwapState
impl<'de> Deserialize<'de> for SwapState
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for SwapState
impl PartialEq for SwapState
impl Copy for SwapState
impl Eq for SwapState
impl StructuralPartialEq for SwapState
Auto Trait Implementations§
impl RefUnwindSafe for SwapState
impl Send for SwapState
impl Sync for SwapState
impl Unpin for SwapState
impl UnwindSafe for SwapState
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
Mutably borrows from an owned value. Read more