pub struct VpRunner { /* private fields */ }
Expand description
An object used to dispatch a virtual processor.
Implementations§
Source§impl VpRunner
impl VpRunner
Sourcepub async fn run(
&mut self,
vp: &mut (impl Processor + ProtobufSaveRestore),
io: &impl CpuIo,
) -> Result<(), RunCancelled>
pub async fn run( &mut self, vp: &mut (impl Processor + ProtobufSaveRestore), io: &impl CpuIo, ) -> Result<(), RunCancelled>
Runs the VP dispatch loop for vp
, using io
to handle CPU requests.
Returns RunCancelled
if RunnerCanceller::cancel
was called, or
if the VP returns VpHaltReason::Cancel
. In this case, the call can
be reissued, with the same or different vp
object, to continue running
the VP.
Do not reissue this call if it returns Ok
. Do not drop this future
without awaiting it to completion.
Sourcepub fn canceller(&self) -> RunnerCanceller
pub fn canceller(&self) -> RunnerCanceller
Returns an object that can be used to cancel a run
call.
Auto Trait Implementations§
impl Freeze for VpRunner
impl !RefUnwindSafe for VpRunner
impl Send for VpRunner
impl Sync for VpRunner
impl Unpin for VpRunner
impl !UnwindSafe for VpRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more