netvsp

Trait VirtualFunction

Source
pub trait VirtualFunction: Sync + Send {
    // Required methods
    fn id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Option<u32>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn guest_ready_for_device<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn wait_for_state_change<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Rpc<(), ()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Represents a virtual function (VF) device used to expose accelerated networking to the guest.

Required Methods§

Source

fn id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<u32>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unique ID of the device. Used by the client to associate a device with its synthetic counterpart. A value of None signifies that the VF is not currently available for use.

Source

fn guest_ready_for_device<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dynamically expose the device in the guest.

Source

fn wait_for_state_change<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Rpc<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns when there is a change in VF availability. The Rpc result will indicate if the change was successfully handled.

Implementors§