pub(crate) trait IgvmfilegenRegister: IgvmLoaderRegister + 'static {
// Required methods
fn load_uefi(
importer: &mut dyn ImageLoad<Self>,
image: &[u8],
config: ConfigType,
) -> Result<LoadInfo, Error>;
fn load_linux_kernel_and_initrd<F>(
importer: &mut impl ImageLoad<Self>,
kernel_image: &mut F,
kernel_minimum_start_address: u64,
initrd: Option<InitrdConfig<'_>>,
device_tree_blob: Option<&[u8]>,
) -> Result<LoadInfo, Error>
where F: Read + Seek,
Self: GuestArch;
fn load_openhcl<F>(
importer: &mut dyn ImageLoad<Self>,
kernel_image: &mut F,
shim: &mut F,
sidecar: Option<&mut F>,
command_line: CommandLineType<'_>,
initrd: Option<&[u8]>,
memory_page_base: Option<u64>,
memory_page_count: u64,
vtl0_config: Vtl0Config<'_>,
) -> Result<(), Error>
where F: Read + Seek;
}Expand description
A trait to specialize behavior of the file builder based on different register types for different architectures. Different methods may need to be called depending on the register type that represents the given architecture.
Required Methods§
fn load_uefi( importer: &mut dyn ImageLoad<Self>, image: &[u8], config: ConfigType, ) -> Result<LoadInfo, Error>
fn load_linux_kernel_and_initrd<F>( importer: &mut impl ImageLoad<Self>, kernel_image: &mut F, kernel_minimum_start_address: u64, initrd: Option<InitrdConfig<'_>>, device_tree_blob: Option<&[u8]>, ) -> Result<LoadInfo, Error>
fn load_openhcl<F>( importer: &mut dyn ImageLoad<Self>, kernel_image: &mut F, shim: &mut F, sidecar: Option<&mut F>, command_line: CommandLineType<'_>, initrd: Option<&[u8]>, memory_page_base: Option<u64>, memory_page_count: u64, vtl0_config: Vtl0Config<'_>, ) -> Result<(), Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.