pub trait Vm: Send {
// Required methods
fn inject<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
host_path: &'life1 Path,
guest_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn exec<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
cmd: &'life1 str,
env: &'life2 [(String, String)],
working_dir: &'life3 str,
sink: &'life4 dyn OutputSink,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn snapshot<'life0, 'life1, 'async_trait>(
&'life0 mut self,
label: &'life1 SnapshotLabel,
) -> Pin<Box<dyn Future<Output = Result<SnapshotId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn destroy<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handle to a running virtual machine.
Required Methods§
Sourcefn inject<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
host_path: &'life1 Path,
guest_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn inject<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
host_path: &'life1 Path,
guest_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Copy a host path into the guest filesystem.
Sourcefn exec<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
cmd: &'life1 str,
env: &'life2 [(String, String)],
working_dir: &'life3 str,
sink: &'life4 dyn OutputSink,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn exec<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
cmd: &'life1 str,
env: &'life2 [(String, String)],
working_dir: &'life3 str,
sink: &'life4 dyn OutputSink,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Run a command inside the VM and stream output to sink.
Sourcefn snapshot<'life0, 'life1, 'async_trait>(
&'life0 mut self,
label: &'life1 SnapshotLabel,
) -> Pin<Box<dyn Future<Output = Result<SnapshotId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn snapshot<'life0, 'life1, 'async_trait>(
&'life0 mut self,
label: &'life1 SnapshotLabel,
) -> Pin<Box<dyn Future<Output = Result<SnapshotId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Capture the current VM state as a named snapshot.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".