pub struct SimpleDeviceWrapper<T: SimpleVmbusDevice> { /* private fields */ }
Expand description
A wrapper around SimpleVmbusDevice
that implements VmbusDevice
.
Implementations§
Source§impl<T: SimpleVmbusDevice> SimpleDeviceWrapper<T>
impl<T: SimpleVmbusDevice> SimpleDeviceWrapper<T>
Sourcepub fn new(driver: VmTaskDriver, device: T) -> Self
pub fn new(driver: VmTaskDriver, device: T) -> Self
Creates a new wrapper, spawning tasks on driver_source
.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Gets the inner device back out.
Trait Implementations§
Source§impl<T: SimpleVmbusDevice> InspectMut for SimpleDeviceWrapper<T>
impl<T: SimpleVmbusDevice> InspectMut for SimpleDeviceWrapper<T>
Source§fn inspect_mut(&mut self, req: Request<'_>)
fn inspect_mut(&mut self, req: Request<'_>)
Inspects the object.
Source§impl<T: SimpleVmbusDevice> SaveRestoreVmbusDevice for SimpleDeviceWrapper<T>
impl<T: SimpleVmbusDevice> SaveRestoreVmbusDevice for SimpleDeviceWrapper<T>
Source§fn save<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<SavedStateBlob, SaveError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<SavedStateBlob, SaveError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save the stopped device.
Source§fn restore<'life0, 'life1, 'async_trait>(
&'life0 mut self,
control: RestoreControl<'life1>,
state: SavedStateBlob,
) -> Pin<Box<dyn Future<Output = Result<(), RestoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn restore<'life0, 'life1, 'async_trait>(
&'life0 mut self,
control: RestoreControl<'life1>,
state: SavedStateBlob,
) -> Pin<Box<dyn Future<Output = Result<(), RestoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Restore the stopped device. Read more
Source§impl<T: SimpleVmbusDevice> VmbusDevice for SimpleDeviceWrapper<T>
impl<T: SimpleVmbusDevice> VmbusDevice for SimpleDeviceWrapper<T>
Source§fn offer(&self) -> OfferParams
fn offer(&self) -> OfferParams
The offer parameters.
Source§fn install(&mut self, resources: DeviceResources)
fn install(&mut self, resources: DeviceResources)
Installs resources used by the device.
Source§fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_channel_idx: u16,
open_request: &'life1 OpenRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_channel_idx: u16,
open_request: &'life1 OpenRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Opens the channel number
channel_idx
.Source§fn close<'life0, 'async_trait>(
&'life0 mut self,
_channel_idx: u16,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
_channel_idx: u16,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Closes the channel number
channel_idx
.Source§fn retarget_vp<'life0, 'async_trait>(
&'life0 mut self,
_channel_idx: u16,
target_vp: u32,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn retarget_vp<'life0, 'async_trait>(
&'life0 mut self,
_channel_idx: u16,
target_vp: u32,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Notifies the device that interrupts for channel will now target
target_vp
.Source§fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop processing of all channels.
Source§fn supports_save_restore(&mut self) -> Option<&mut dyn SaveRestoreVmbusDevice>
fn supports_save_restore(&mut self) -> Option<&mut dyn SaveRestoreVmbusDevice>
Returns a trait used to save/restore the channel. Read more
Source§fn max_subchannels(&self) -> u16
fn max_subchannels(&self) -> u16
The maximum number of subchannels supported by this device.
Auto Trait Implementations§
impl<T> Freeze for SimpleDeviceWrapper<T>
impl<T> !RefUnwindSafe for SimpleDeviceWrapper<T>
impl<T> Send for SimpleDeviceWrapper<T>
impl<T> Sync for SimpleDeviceWrapper<T>
impl<T> Unpin for SimpleDeviceWrapper<T>
impl<T> !UnwindSafe for SimpleDeviceWrapper<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more