ConfigStorageHandler

Trait ConfigStorageHandler 

Source
pub trait ConfigStorageHandler: Debug {
Show 16 methods // Required methods fn create(&self, vm: &VM) -> Result<()>; fn delete(&self, vm: &VM, disk: Option<String>) -> Result<()>; fn running_vms(&self) -> Result<Vec<VM>>; fn base_path(&self) -> PathBuf; fn config_path(&self, vm: &VM) -> PathBuf; fn vm_root(&self, vm: &VM) -> PathBuf; fn monitor_path(&self, vm: &VM) -> PathBuf; fn write_config(&self, vm: VM) -> Result<()>; fn vm_exists(&self, vm: &VM) -> bool; fn vm_list(&self) -> Result<Vec<VM>>; fn vm_path(&self, vm: &VM, filename: &str) -> PathBuf; fn vm_path_exists(&self, vm: &VM, filename: &str) -> bool; fn rename(&self, old: &VM, new: &VM) -> Result<()>; fn disk_list(&self, vm: &VM) -> Result<Vec<PathBuf>>; fn pidfile(&self, vm: &VM) -> PathBuf; fn size(&self, vm: &VM) -> Result<usize>;
}

Required Methods§

Source

fn create(&self, vm: &VM) -> Result<()>

Source

fn delete(&self, vm: &VM, disk: Option<String>) -> Result<()>

Source

fn running_vms(&self) -> Result<Vec<VM>>

Source

fn base_path(&self) -> PathBuf

Source

fn config_path(&self, vm: &VM) -> PathBuf

Source

fn vm_root(&self, vm: &VM) -> PathBuf

Source

fn monitor_path(&self, vm: &VM) -> PathBuf

Source

fn write_config(&self, vm: VM) -> Result<()>

Source

fn vm_exists(&self, vm: &VM) -> bool

Source

fn vm_list(&self) -> Result<Vec<VM>>

Source

fn vm_path(&self, vm: &VM, filename: &str) -> PathBuf

Source

fn vm_path_exists(&self, vm: &VM, filename: &str) -> bool

Source

fn rename(&self, old: &VM, new: &VM) -> Result<()>

Source

fn disk_list(&self, vm: &VM) -> Result<Vec<PathBuf>>

Source

fn pidfile(&self, vm: &VM) -> PathBuf

Source

fn size(&self, vm: &VM) -> Result<usize>

Implementors§