Trait virt::Hypervisor

source ·
pub trait Hypervisor: 'static {
    type ProtoPartition<'a>: ProtoPartition<Partition = Self::Partition>;
    type Partition;
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn is_available(&self) -> Result<bool, Self::Error>;
    fn new_partition<'a>(
        &'a mut self,
        config: ProtoPartitionConfig<'a>,
    ) -> Result<Self::ProtoPartition<'a>, Self::Error>;
}

Required Associated Types§

source

type ProtoPartition<'a>: ProtoPartition<Partition = Self::Partition>

The prototype partition type.

source

type Partition

The partition type.

source

type Error: Error + Send + Sync + 'static

The error type when creating the partition.

Required Methods§

source

fn is_available(&self) -> Result<bool, Self::Error>

Returns whether this hypervisor is available on this machine.

source

fn new_partition<'a>( &'a mut self, config: ProtoPartitionConfig<'a>, ) -> Result<Self::ProtoPartition<'a>, Self::Error>

Returns a new prototype partition from the given configuration.

Object Safety§

This trait is not object safe.

Implementors§