vmcore::vm_task

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§