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§
Sourcefn retarget_vp(&self, target_vp: u32)
fn retarget_vp(&self, target_vp: u32)
Retargets the driver to the specified virtual processor.
Provided Methods§
Sourcefn is_target_vp_ready(&self) -> bool
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.
Sourcefn wait_target_vp_ready(&self) -> impl Future<Output = ()> + Send
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.