use crate::VirtioDevice;
use guestmem::GuestMemory;
use vm_resource::CanResolveTo;
use vm_resource::kind::VirtioDeviceHandle;
use vmcore::vm_task::VmTaskDriverSource;
impl CanResolveTo<ResolvedVirtioDevice> for VirtioDeviceHandle {
type Input<'a> = VirtioResolveInput<'a>;
}
pub struct ResolvedVirtioDevice(pub Box<dyn VirtioDevice>);
impl<T: 'static + VirtioDevice> From<T> for ResolvedVirtioDevice {
fn from(value: T) -> Self {
Self(Box::new(value))
}
}
pub struct VirtioResolveInput<'a> {
pub driver_source: &'a VmTaskDriverSource,
pub guest_memory: &'a GuestMemory,
}