use std::path::PathBuf;
pub struct MachineOpts {
pub ram_size: u64,
pub cpu_count: u32,
pub kernel: Option<PathBuf>,
pub bios: Option<PathBuf>,
pub append: Option<String>,
pub nographic: bool,
pub drive: Option<PathBuf>,
}
pub trait Machine: Send + Sync {
fn name(&self) -> &str;
fn init(
&mut self,
opts: &MachineOpts,
) -> Result<(), Box<dyn std::error::Error>>;
fn reset(&mut self);
fn pause(&mut self);
fn resume(&mut self);
fn shutdown(&mut self);
fn boot(&mut self) -> Result<(), Box<dyn std::error::Error>>;
fn cpu_count(&self) -> usize;
fn ram_size(&self) -> u64;
}