Skip to main content

VmmProvider

Trait VmmProvider 

Source
pub trait VmmProvider: Send + Sync {
    // Required method
    fn start<'life0, 'life1, 'async_trait>(
        &'life0 self,
        spec: &'life1 InstanceSpec,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn VmHandler>, BoxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Trait for VMM backend implementations.

Implement this to plug in an alternative hypervisor (e.g., QEMU, Cloud Hypervisor) without changing any runtime code.

Required Methods§

Source

fn start<'life0, 'life1, 'async_trait>( &'life0 self, spec: &'life1 InstanceSpec, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn VmHandler>, BoxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Start a VM from the given spec. Returns a handler for its lifetime.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§