pub trait VmbusDevice:
Send
+ IntoAny
+ InspectMut {
// Required methods
fn offer(&self) -> OfferParams;
fn install(&mut self, resources: DeviceResources);
fn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel_idx: u16,
open_request: &'life1 OpenRequest,
) -> Pin<Box<dyn Future<Output = Result<(), ChannelOpenError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: '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;
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 start(&mut self);
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn supports_save_restore(
&mut self,
) -> Option<&mut dyn SaveRestoreVmbusDevice>;
// Provided method
fn max_subchannels(&self) -> u16 { ... }
}
Expand description
Trait implemented by VMBus devices.
Required Methods§
Sourcefn offer(&self) -> OfferParams
fn offer(&self) -> OfferParams
The offer parameters.
Sourcefn install(&mut self, resources: DeviceResources)
fn install(&mut self, resources: DeviceResources)
Installs resources used by the device.
Sourcefn open<'life0, 'life1, 'async_trait>(
&'life0 mut self,
channel_idx: u16,
open_request: &'life1 OpenRequest,
) -> Pin<Box<dyn Future<Output = Result<(), ChannelOpenError>> + 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<(), ChannelOpenError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Opens the channel number channel_idx
.
Sourcefn 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
.
Sourcefn 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
.
Sourcefn 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.
Sourcefn 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.
Returns None
if save/restore is not supported, in which case the
channel will be revoked and reoffered on restore.
Provided Methods§
Sourcefn max_subchannels(&self) -> u16
fn max_subchannels(&self) -> u16
The maximum number of subchannels supported by this device.