pub struct VmTaskDriver { /* private fields */ }
Expand description
A driver returned by VmTaskDriverSource
.
This can be used to spawn tasks (via Spawn
) and issue async IO (via Driver
).
Implementations§
Source§impl VmTaskDriver
impl VmTaskDriver
Sourcepub fn retarget_vp(&self, target_vp: u32)
pub fn retarget_vp(&self, target_vp: u32)
Updates the target VP for the task.
Sourcepub fn is_target_vp_ready(&self) -> bool
pub fn is_target_vp_ready(&self) -> bool
Returns whether the 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.
Sourcepub async fn wait_target_vp_ready(&self)
pub async fn wait_target_vp_ready(&self)
Waits for the target VP to be ready for tasks and IO.
Trait Implementations§
Source§impl Clone for VmTaskDriver
impl Clone for VmTaskDriver
Source§fn clone(&self) -> VmTaskDriver
fn clone(&self) -> VmTaskDriver
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Driver for VmTaskDriver
impl Driver for VmTaskDriver
Source§fn new_dyn_timer(&self) -> PollImpl<dyn PollTimer>
fn new_dyn_timer(&self) -> PollImpl<dyn PollTimer>
Returns a new timer.
Source§fn new_dyn_fd_ready(&self, fd: RawFd) -> Result<PollImpl<dyn PollFdReady>>
fn new_dyn_fd_ready(&self, fd: RawFd) -> Result<PollImpl<dyn PollFdReady>>
Returns a new object for polling file descriptor readiness.
Source§fn new_dyn_socket_ready(
&self,
socket: RawFd,
) -> Result<PollImpl<dyn PollSocketReady>>
fn new_dyn_socket_ready( &self, socket: RawFd, ) -> Result<PollImpl<dyn PollSocketReady>>
Creates a new object for polling socket readiness.
Source§impl Spawn for VmTaskDriver
impl Spawn for VmTaskDriver
Auto Trait Implementations§
impl Freeze for VmTaskDriver
impl !RefUnwindSafe for VmTaskDriver
impl Send for VmTaskDriver
impl Sync for VmTaskDriver
impl Unpin for VmTaskDriver
impl !UnwindSafe for VmTaskDriver
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