pub trait Storage {
// Required methods
fn create_image(&self, vm: &mut Vm) -> Result<()>;
fn destroy_image(&self, vm: &mut Vm) -> Result<()>;
fn create_snapshot(
&self,
vm: &mut Vm,
snapshot: &Snapshot,
) -> Result<String>;
fn destroy_snapshot(&self, vm: &Vm, snapshot_path: &str) -> Result<()>;
fn apply_snapshot(&self, vm: &Vm, snapshot: &Snapshot) -> Result<()>;
}Expand description
This trait describes how to manage the ‘runtime image’.
Required Methods§
Sourcefn create_image(&self, vm: &mut Vm) -> Result<()>
fn create_image(&self, vm: &mut Vm) -> Result<()>
Create a runtime image from it’s template.
Sourcefn destroy_image(&self, vm: &mut Vm) -> Result<()>
fn destroy_image(&self, vm: &mut Vm) -> Result<()>
Destroy a runtime image.
Sourcefn create_snapshot(&self, vm: &mut Vm, snapshot: &Snapshot) -> Result<String>
fn create_snapshot(&self, vm: &mut Vm, snapshot: &Snapshot) -> Result<String>
Add a snapshot for the runtime image.