Trait devices::suspendable::Suspendable
source · pub trait Suspendable {
// Provided methods
fn snapshot(&mut self) -> Result<Value> { ... }
fn restore(&mut self, _data: Value) -> Result<()> { ... }
fn sleep(&mut self) -> Result<()> { ... }
fn wake(&mut self) -> Result<()> { ... }
}
Expand description
This trait provides the functions required for a device to implement to successfully suspend/resume in crosvm.
Provided Methods§
sourcefn snapshot(&mut self) -> Result<Value>
fn snapshot(&mut self) -> Result<Value>
Save the device state in an image that can be restored.
Implementations on Foreign Types§
Implementors§
impl Suspendable for AcAdapter
impl Suspendable for ACPIPMResource
impl Suspendable for GoldfishBattery
impl Suspendable for Cmos
impl Suspendable for Debugcon
impl Suspendable for FwCfgDevice
impl Suspendable for I8042Device
impl Suspendable for Ioapic
impl Suspendable for Pic
The PIC is only used in very early boot on x86_64, and snapshots are not generally taken during that time, so we can safely skip the PIC for now.