Storage

Trait Storage 

Source
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§

Source

fn create_image(&self, vm: &mut Vm) -> Result<()>

Create a runtime image from it’s template.

Source

fn destroy_image(&self, vm: &mut Vm) -> Result<()>

Destroy a runtime image.

Source

fn create_snapshot(&self, vm: &mut Vm, snapshot: &Snapshot) -> Result<String>

Add a snapshot for the runtime image.

Source

fn destroy_snapshot(&self, vm: &Vm, snapshot_path: &str) -> Result<()>

Delete a snapshot of the runtime image.

Source

fn apply_snapshot(&self, vm: &Vm, snapshot: &Snapshot) -> Result<()>

Revert to the state of this snapshot.

Implementors§