vmbus_channel/
resources.rsuse crate::channel::VmbusDevice;
use vm_resource::CanResolveTo;
use vm_resource::kind::VmbusDeviceHandleKind;
use vmcore::vm_task::VmTaskDriverSource;
impl CanResolveTo<ResolvedVmbusDevice> for VmbusDeviceHandleKind {
type Input<'a> = ResolveVmbusDeviceHandleParams<'a>;
}
pub struct ResolveVmbusDeviceHandleParams<'a> {
pub driver_source: &'a VmTaskDriverSource,
}
pub struct ResolvedVmbusDevice(pub Box<dyn VmbusDevice>);
impl<T: 'static + VmbusDevice> From<T> for ResolvedVmbusDevice {
fn from(value: T) -> Self {
Self(Box::new(value))
}
}