Trait virt::ProtoPartition

source ·
pub trait ProtoPartition {
    type Partition: Partition;
    type ProcessorBinder: 'static + BindProcessor + Send;
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn cpuid(&self, eax: u32, ecx: u32) -> [u32; 4];
    fn max_physical_address_size(&self) -> u8;
    fn build(
        self,
        config: PartitionConfig<'_>,
    ) -> Result<(Self::Partition, Vec<Self::ProcessorBinder>), Self::Error>;
}
Expand description

Trait for a prototype partition, one that is partially created but still needs final configuration.

This is separate from the partition so that it can be queried to determine the final partition configuration.

Required Associated Types§

source

type Partition: Partition

The partition type.

source

type ProcessorBinder: 'static + BindProcessor + Send

The VP binder type.

source

type Error: Error + Send + Sync + 'static

The error type when creating the partition.

Required Methods§

source

fn cpuid(&self, eax: u32, ecx: u32) -> [u32; 4]

Gets the default guest cpuid value for inputs eax and ecx.

source

fn max_physical_address_size(&self) -> u8

The number of bits of a physical address.

source

fn build( self, config: PartitionConfig<'_>, ) -> Result<(Self::Partition, Vec<Self::ProcessorBinder>), Self::Error>

Constructs the full partition.

Implementors§