Trait devices::bus::BusDeviceSync
source · pub trait BusDeviceSync: BusDevice + Sync {
// Required methods
fn read(&self, offset: BusAccessInfo, data: &mut [u8]);
fn write(&self, offset: BusAccessInfo, data: &[u8]);
// Provided methods
fn snapshot_sync(&self) -> Result<Value> { ... }
fn restore_sync(&self, _data: Value) -> Result<()> { ... }
fn sleep_sync(&self) -> Result<()> { ... }
fn wake_sync(&self) -> Result<()> { ... }
}
Required Methods§
fn read(&self, offset: BusAccessInfo, data: &mut [u8])
fn write(&self, offset: BusAccessInfo, data: &[u8])
Provided Methods§
fn snapshot_sync(&self) -> Result<Value>
sourcefn restore_sync(&self, _data: Value) -> Result<()>
fn restore_sync(&self, _data: Value) -> Result<()>
Load a saved snapshot of an image.
sourcefn sleep_sync(&self) -> Result<()>
fn sleep_sync(&self) -> Result<()>
Stop all threads related to the device. Sleep should be idempotent.