pub trait VmBackend:
Send
+ Sync
+ Debug {
// Required methods
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
image: &'life1 str,
config: &'life2 VmConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Vm>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn restore<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
config: &'life2 VmConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Vm>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn snapshot_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Factory that creates and manages virtual machines.
Required Methods§
Sourcefn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
image: &'life1 str,
config: &'life2 VmConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Vm>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
image: &'life1 str,
config: &'life2 VmConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Vm>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Boot a new VM from the given OCI image reference.
Sourcefn restore<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
config: &'life2 VmConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Vm>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn restore<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
config: &'life2 VmConfig,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Vm>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Restore a VM from a previously taken snapshot.
Sourcefn snapshot_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn snapshot_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check whether a snapshot exists in the backend store.
Sourcefn remove_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 SnapshotId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a snapshot from the backend store.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".