Trait vmcore::vm_task::TargetedDriver

source ·
pub trait TargetedDriver:
    'static
    + Send
    + Sync
    + Inspect {
    // Required methods
    fn spawner(&self) -> &dyn Spawn;
    fn driver(&self) -> &dyn Driver;
    fn retarget_vp(&self, target_vp: u32);

    // Provided methods
    fn is_target_vp_ready(&self) -> bool { ... }
    fn wait_target_vp_ready(&self) -> impl Future<Output = ()> + Send { ... }
}
Expand description

Trait implemented by drivers built with BuildVmTaskDriver.

Required Methods§

source

fn spawner(&self) -> &dyn Spawn

Returns the implementation to use for spawning tasks.

source

fn driver(&self) -> &dyn Driver

Returns the implementation to use for driving IO.

source

fn retarget_vp(&self, target_vp: u32)

Retargets the driver to the specified virtual processor.

Provided Methods§

source

fn is_target_vp_ready(&self) -> bool

Returns whether a driver’s target VP is ready for tasks and IO.

A driver must be operable even if this is false, but the tasks and IO may run on a different target VP.

source

fn wait_target_vp_ready(&self) -> impl Future<Output = ()> + Send

Waits for this driver’s target VP to be ready for tasks and IO.

Object Safety§

This trait is not object safe.

Implementors§